@dataclass(frozen=True)class SummaryRowInfo:"""Information about a single summary row"""id: str label: str# For now, label and id are identical values: dict[str, str|int|float] # TODO: consider datatype side: Literal["top", "bottom"] # TODO: switch to enum group: GroupRowInfoclass SummaryRows(_Sequence[SummaryRowInfo]):"""A sequence of summary rows""" _d: list[SummaryRowInfo]def__init__(self, rows: list[SummaryRowInfo] |None=None):self._d = []for row in rows or []:self.add_summary_row(row)