(a) Appointment.--The court may appoint counsel to represent the child if the court determines that the appointment will assist in resolving the issues in the custody proceeding. If a child has legal counsel and a guardian ad litem, counsel shall represent the legal interests of the child and the guardian ad litem shall represent the best interests of the child.
(b) Abuse.--Substantial allegations of abuse of the child constitute a reasonable basis for appointing counsel for the child.
(c) Not subject to examination.--Counsel appointed by the court for the child shall not be subject to examination unless such counsel testifies in the matter.
(d) Costs.--The court may order a party to pay all or part of the costs of appointing counsel for the child under this section.
Cross References. Section 5335 is referred to in section 5334 of this title.