§ 1028. Application to return child temporarily removed. (a) Upon the application of the parent or other person legally responsible for the care of a child temporarily removed under this part or upon the application of the child’s attorney for an order returning the child, the court shall hold a hearing to determine whether the child should be returned (i) unless there has been a hearing pursuant to section one thousand twenty-seven of this article on the removal of the child at which the parent or other person legally responsible for the child’s care was present and had the opportunity to be represented by counsel, or (ii) upon good cause shown. Except for good cause shown, such hearing shall be held within three court days of the application and shall not be adjourned. Upon such hearing, the court shall grant the application, unless it finds that the return presents an imminent risk to the child’s life or health. If a parent or other person legally responsible for the care of a child waives his or her right to a hearing under this section, the court shall advise such person at that time that, notwithstanding such waiver, an application under this section may be made at any time during the pendency of the proceedings.

(b) In determining whether temporary removal of the child is necessary to avoid imminent risk to the child’s life or health, the court shall consider and determine in its order whether continuation in the child’s home would be contrary to the best interests of the child and where appropriate, whether reasonable efforts were made prior to the date of the hearing to prevent or eliminate the need for removal of the child from the home and where appropriate, whether reasonable efforts were made after removal of the child to make it possible for the child to safely return home.

(c) If the court determines that reasonable efforts to prevent or eliminate the need for removal of the child from the home were not made but that the lack of such efforts was appropriate under the circumstances, the court order shall include such a finding.

(d) If the court determines that reasonable efforts to prevent or eliminate the need for removal of the child from the home were not made but that such efforts were appropriate under the circumstances, the court shall order the child protective agency to provide or arrange for the provision of appropriate services or assistance to the child and the child’s family pursuant to section one thousand fifteen-a or as enumerated in subdivision (c) of section one thousand twenty-two of this article, notwithstanding the fact that a petition has been filed.

(e) The court may issue a temporary order of protection pursuant to section ten hundred twenty-nine of this article as an alternative to or in conjunction with any other order or disposition authorized under this section.

(f) The court shall also consider and determine whether imminent risk to the child would be eliminated by the issuance of a temporary order of protection, pursuant to section ten hundred twenty-nine of this article, directing the removal of a person or persons from the child’s residence.