(36) Ward of the state.--
(A) In general.--The term `ward of the State' means a child who, as determined by the State where the child resides, is a foster child, is a ward of the State, or is in the custody of a public child welfare agency.
(B) Exception.--The term does not include a foster child who has a foster parent who meets the definition of a parent in paragraph (23).
