; and (ii) on the date on which the individual has completed every term of probation, official detention, or juvenile delinquent supervision ordered by the court with respect to the offense. (2) Procedures (A) Notification to prosecutor If a person files a sealing petition with respect to a juvenile nonviolent offense, the court in which the petition is filed shall provide notice of the petition— (i) to the Attorney General; and (ii) upon the request of the petitioner, to any other individual that the petitioner determines may testify as to— (I) the conduct of the petitioner since the date of the offense; or (II) the reasons that the sealing order should be entered. (B) Hearing (i) In general Not later than 6 months after the date on which a person files a sealing petition, the court shall— (I) except as provided in clause (iii), conduct a hearing in accordance with clause (ii); and (II) determine whether to enter a sealing order for the person in accordance with subparagraph (C). (ii) Opportunity to testify and offer evidence (I) Petitioner The petitioner may testify or offer evidence at the sealing hearing in support of sealing. (II) Prosecutor The Attorney General may send a representative to testify or offer evidence at the sealing hearing in support of or against sealing. (III) Other individuals An individual who receives notice under subparagraph (A)(ii) may testify or offer evidence at the sealing hearing as to the issues described in subclauses (I) and (II) of that subparagraph. (iii) Waiver of hearing If the petitioner and the Attorney General so agree, the court shall make a determination under subparagraph (C) without a hearing. (C) Basis for decision The court shall determine whether to grant the sealing petition after considering— (i) the sealing petition and any documents in the possession of the court; (ii) all the evidence and testimony presented at the sealing hearing, if such a hearing is conducted; (iii) the best interests of the petitioner