; and (B) the Director of the Bureau of Prisons has, on its own or in response to the court, made a determination that the youth is not a danger to the safety of any other person or the community, as provided under section 3142(g). . (b) Mandatory life sentence Section 3581 of title 18, United States Code, is amended by adding at the end the following: (c) Mandatory life sentence In the case of a youth convicted of an offense that carries a mandatory term of life imprisonment, the sentencing court shall treat the life sentence as discretionary and consider the age of the youth in determining the appropriate sentence. (d) Definition In this section, the term youth means an individual who was 21 years of age or younger at the time of the commission of the criminal offense for which the individual is being sentenced or is serving a term of imprisonment. . 5. Smarter probation for youth (a) In general Section 3565 of title 18, United States Code, is amended— (1) in subsection (a), by striking If and inserting Except as provided in subsection (d), if ; and (2) by adding at the end the following: (d) Special Rule for Technical Violations If the violation of a condition is solely technical, and not a conviction of a criminal offense, then the maximum punishment that can be imposed is not more than— (1) 30 days imprisonment if the violation is the first violation during the defendant’s period of probation; (2) 60 days imprisonment if the violation is a second violation during the defendant’s period of probation