I Am Sam

At the trial, Sam cries. After the trial, Lucy resides in a foster home with Randy Carpenter (Laura Dern), but tries to convince Sam to help her run away, and continually escapes in the middle of the night to go to Sam's apartment, (having learned from the failed attempt to run away) he immediately returns her. The foster family decides not to adopt her like they planned. They decide to give her back to Sam. When returning Lucy to Sam, Randy tells him that she will tell the judge that Sam is a better parent for Lucy. Sam asks Randy if she will help him raise her because he feels like he needs help, and Lucy need another parent.

Question: does sam get lucy back in i am sam
Answer: yes