; or (4) work at paid employment in the community while continuing in official detention at the penal or correctional facility if the rates of pay and other conditions of employment will not be less than those paid or provided for work of a similar nature in the community. (b) Definition As used in this section, the term imprisonment means custodial detention, juvenile official detention, or community supervision, both prior to a trial or a dispositional hearing, and after conviction or adjudication. (c) Petition Upon petition from a person who is under an order of imprisonment, a judicial officer is authorized to release such person under subsection (a) and may set the least restrictive conditions of release necessary to meet the requirements of safety and justice. Such authorization shall be provided for the purposes listed in subsection (a) if it is consistent with the purpose for which any sentence was imposed if applicable and any pertinent policy statement issued by the Sentencing Commission pursuant to section 994(a)(2) of title 28, United States Code, unless a factual showing is made to the court demonstrating that the release would create an imminent risk of flight or harm to the incarcerated person or others. . 203. Updating custody requirements to preserve families Section 475(5)(E) of the Social Security Act ( 42 U.S.C. 675(5)(E) ) is amended— (1) by striking 15 of the most recent 22 months and inserting 24 consecutive months and who is not in the care of kin (including fictive kin), the State may consider filing or joining a petition for modification or termination of parental rights only after demonstrating by clear and convincing evidence that the State has provided to the family of the child such services, supports, and time needed to address the reasons for foster care and enable the family to safely reunify, and by demonstrating compelling reasons why the modification or termination is in the best interest of the child, and if the child is living with a kinship (including fictive kinship)