One of Lindsay Lohan's close friends -- and a co-star in the movie "Machete" -- has written a letter to Judge Elden Fox ... pleading with him to spare Lindsay from jail time.
TMZ has obtained a letter Electra Avellan wrote for the judge. We're told Electra wrote the letter with a few other friends -- and she's trying to get the letter to Judge Fox before this morning's hearing. It reads:
Dear Judge Fox,
I am writing you in regards to Lindsay Lohan. I have had the pleasure to get to know her very well and have endured the past year with her through her highs and lows. I am desperate to get this message to you. She is working really hard to be better and has done everything possible to stay healthy and clean. We (family members and loving friends) have separated her from anyone who can harm her or deviate her from her goals which are to be a model citizen. She is aware of her impact in this world and wants to rise from this. A few days ago she had a very low moment and made a mistake that has her so terrified it is breaking my heart. I am truly concerned for her well being.
Please Judge Fox look at Lindsay and know that she is a woman who is struggling to get her life back on track, maybe as a day patient and a lot of wonderful community service we can have her pay back the mistake. I also think that community service can show her a different human dimension and allow her to count her blessings more often. I want to see her succeed and shine again. Please help her do it. She wants to get away from this madness. She needs help.