class Region(NamedTuple): name: str num_packages: int package_cost: float number_of_units: List[int] = ParseList( fixed_length=counts.num_services) latencies: List[int] = ParseList( fixed_length=counts.num_countries)
class Provider(NamedTuple): name: str num_regions: int regions: List[Region] = ParseList( length_parameter='num_regions')
class Doc(NamedTuple): num_lines: int lines: List[Line] = ParseList(length_parameter='num_lines')
class Line(NamedTuple): items: List[str] = ParseList( length_callable=lambda: next(length_iter))
class Line(NamedTuple): length: int items: List[str] = ParseList(length_parameter='length')
class Line(NamedTuple): items: List[str] = ParseList(fixed_length=3)
class Project(NamedTuple): penalty: int country: str units_needed: List[int] = ParseList( fixed_length=counts.num_services)