; or (B) any number of political subdivisions described in subparagraph (A) which form a partnership for purposes of implementing the demonstration project under this subsection. (4) Length of demonstration project (A) In general Subject to subparagraph (B), a qualifying political subdivision selected to participate in the demonstration project under this subsection or partnership described in paragraph (3)(B) (referred to in this subsection as a participating political subdivision ) shall provide medical assistance for individuals described in subclause (VIII) of subsection (a)(10)(A)(i) for seven years or through the day before the date on which the State in which such political subdivision is located provides for medical assistance under the State plan (or a waiver of such plan) for such individuals, whichever is shorter. (B) Extension A participating political subdivision that participates in the demonstration project under this subsection for five years may extend its participation in the demonstration project by submitting an application to the Secretary at such time, in such manner, and containing such information as the Secretary may require. Under such extension, such political subdivision shall provide medical assistance for individuals described in subclause (VIII) of subsection (a)(10)(A)(i) for up to an additional five years or through the day before the date on which the State in which such political subdivision is located provides for medical assistance under the State plan (or a waiver of such plan) for such individuals, whichever is shorter. (C) Automatic enrollment in case of States that elect to provide medical assistance for expansion population In the case of a participating political subdivision whose participation in the demonstration project under this subsection ends because the State in which such political subdivision is located elects to provide for medical assistance under the State plan (or a waiver of such plan) for individuals described in subclause (VIII) of subsection