Section 67. Except for children in need of service arrested pursuant to section thirty-nine H, whenever a child between seven and seventeen years of age is arrested with or without a warrant, as provided by law, the officer in charge of the police station or town lockup to which the child has been taken shall immediately notify the probation officer of the district court, or of the juvenile court, if there is one, within whose judicial district such child was arrested and at least one of the child’s parents, or, if there is no parent, the guardian or person with whom it is stated that such child resides, and shall inquire into the case. Pending such notice and inquiry, such child shall be detained. Upon the acceptance by the officer in charge of said police station or town lockup of the written promise of said parent, guardian or any other reputable person to be responsible for the presence of such child in court at the time and place when such child is to appear or upon the receipt of such officer in charge from said probation officer of a request for the release of such child to him, such child shall be released to said person giving such promise or to said probation officer making such request; provided, that, if the arresting officer requests in writing that a child between fourteen and seventeen years of age be detained, and if the court issuing a warrant for the arrest of a child between fourteen and seventeen years of age directs in the warrant that such child shall be held in safekeeping pending his appearance in court, or, if the probation officer shall so direct, such child shall be detained in a police station or town lockup, or place of temporary custody commonly referred to as a detention home of the department of youth services, or any other home approved by the department of youth services pending his appearance in court. In the event any such child is so detained, the officer in charge at the police station or town lockup shall notify the probation officer and parent or parents, guardian, or person with whom it is stated that such child resides of the detention of such child. Nothing contained in this section shall prevent the admitting of such child to bail in accordance with law. Said probation officer or officer in charge at the police station or town lockup shall notify such child and his parent or parents or guardian or person with whom it is stated that such child resides of the time and place of the hearing of his case. No child between fourteen and seventeen years of age shall be detained in a police station or town lockup unless the detention facilities for children at such police station or town lockup have received the approval in writing of the commissioner of youth services. The department of youth services shall make inspection at least annually of police stations or town lockups wherein children are detained. If no such approved detention facilities exist in any city or town, such city or town may contract with an adjacent city or town for the use of approved detention facilities in order to prevent children who are detained from coming in contact with adult prisoners. Nothing in this section shall permit a child between fourteen and seventeen years of age being detained in a jail or house of correction. A separate and distinct place shall be provided in police stations, town lockups or places of detention for such children.