; and (B) the term violent felony has the meaning given that term in section 924(e)(2). (2) It shall be unlawful for a covered caregiver to, through a willful act or a willful failure to act, cause or enable a child in the care of the covered caregiver who is under 18 years of age to gain possession of a firearm— (A) after having received notice from a child welfare (or other comparable) agency, from a mental health provider for the child, or from an educational institution attended by the child that the child poses a risk of violence or physical harm to himself or herself or to others; or (B) after the covered caregiver knows or reasonably should know that— (i) the child has charges pending for or has been convicted or adjudicated delinquent of a violent felony; or (ii) the child has been determined by a State, local, Tribal, or Federal court to pose a risk of physical harm to himself or herself or to others. (3) (A) A covered caregiver shall not be in violation of paragraph (2)(A) if, at the time of the applicable act or failure to act, the covered caregiver has received notice from a provider or entity listed in such paragraph that the child no longer poses a risk of violence or physical harm to himself or herself or to others. (B) A covered caregiver shall not be in violation of paragraph (2)(B) if, at the time of the applicable act or failure to act, the covered caregiver has received notice that any pending charge for a violent felony has been dismissed or a nolle prosequi has been entered. (4) It is an affirmative defense to prosecution for a violation of paragraph (2) that the covered caregiver enabled a child to gain possession of a firearm while in a dwelling because of a reasonable belief that the covered caregiver or the child was in imminent danger of bodily injury. . (b) Penalty Section 924 of title 18, United States Code, as amended by section 302, is amended— (1) in subsection (a)(1), by striking or (r) and inserting (r), or (s)