(a) In its discretion, the court may appoint a guardian ad litem to represent the child's best interests. The court shall specify the terms of the appointment, including the guardian's role, duties and scope of authority.
(b) In its discretion, the court may appoint a lawyer to represent the child, if the child is competent to direct the terms of the representation and court has a reasonable basis for finding that the appointment would be helpful in resolving the issues of the case. The court shall specify the terms of the appointment, including the lawyer's role, duties and scope of authority.
(c) When substantial allegations of domestic abuse have been made, the court shall order an investigation under section 9-301 or make an appointment under subsection (a) or (b) of this section, unless the court is satisfied that the information necessary to evaluate the allegations will be adequately presented to the court without such order or appointment.
(d) Subject to whatever restrictions the court may impose or that may be imposed by the attorney-client privilege or by subsection 9-202(d), the court may require the child or parent to provide information to an individual or agency appointed by the court under section 9-301 or subsection (a) or (b) of this section, and it may require any person having information about the child or parent to provide that information, even in the absence of consent by a parent or by the child, except if the information is otherwise protected by law.
(e) The investigator who submits a report or evidence to the court that has been requested under section 9-301 and a guardian ad litem appointed under subsection (a) of this section who submits information or recommendations to the court are subject to cross-examination by the parties. A lawyer appointed under subsection (b) of this section may not be a witness in the proceedings, except as allowed under standards applicable in other civil proceedings.
(f) Services and tests ordered under this section shall be ordered only if at no cost to the individuals involved, or at a cost that is reasonable in light of the available financial resources.