from dataclasses import dataclass


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int

    FIELDS = ['valid', 'rejected', 'polled', 'electors']

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled

    @property
    def p_turnout(self):
        return self.polled / self.electors

    @staticmethod
    def concat(
        summary_statistics_list: list,
    ):
        return SummaryStatistics(
            valid=sum([x.valid for x in summary_statistics_list]),
            rejected=sum([x.rejected for x in summary_statistics_list]),
            polled=sum([x.polled for x in summary_statistics_list]),
            electors=sum([x.electors for x in summary_statistics_list]),
        )

    def to_dict(self):
        return dict(
            valid=self.valid,
            rejected=self.rejected,
            polled=self.polled,
            electors=self.electors,
        )

3dcf6a03425361f0ab566a3b0edd756d0835f7b4
<mask token>


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int
    <mask token>

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled
    <mask token>

    @staticmethod
    def concat(summary_statistics_list: list):
        return SummaryStatistics(valid=sum([x.valid for x in
            summary_statistics_list]), rejected=sum([x.rejected for x in
            summary_statistics_list]), polled=sum([x.polled for x in
            summary_statistics_list]), electors=sum([x.electors for x in
            summary_statistics_list]))
    <mask token>

<mask token>


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int
    <mask token>

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled
    <mask token>

    @staticmethod
    def concat(summary_statistics_list: list):
        return SummaryStatistics(valid=sum([x.valid for x in
            summary_statistics_list]), rejected=sum([x.rejected for x in
            summary_statistics_list]), polled=sum([x.polled for x in
            summary_statistics_list]), electors=sum([x.electors for x in
            summary_statistics_list]))

    def to_dict(self):
        return dict(valid=self.valid, rejected=self.rejected, polled=self.
            polled, electors=self.electors)

<mask token>


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int
    <mask token>

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled

    @property
    def p_turnout(self):
        return self.polled / self.electors

    @staticmethod
    def concat(summary_statistics_list: list):
        return SummaryStatistics(valid=sum([x.valid for x in
            summary_statistics_list]), rejected=sum([x.rejected for x in
            summary_statistics_list]), polled=sum([x.polled for x in
            summary_statistics_list]), electors=sum([x.electors for x in
            summary_statistics_list]))

    def to_dict(self):
        return dict(valid=self.valid, rejected=self.rejected, polled=self.
            polled, electors=self.electors)

<mask token>


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int
    FIELDS = ['valid', 'rejected', 'polled', 'electors']

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled

    @property
    def p_turnout(self):
        return self.polled / self.electors

    @staticmethod
    def concat(summary_statistics_list: list):
        return SummaryStatistics(valid=sum([x.valid for x in
            summary_statistics_list]), rejected=sum([x.rejected for x in
            summary_statistics_list]), polled=sum([x.polled for x in
            summary_statistics_list]), electors=sum([x.electors for x in
            summary_statistics_list]))

    def to_dict(self):
        return dict(valid=self.valid, rejected=self.rejected, polled=self.
            polled, electors=self.electors)

from dataclasses import dataclass


@dataclass
class SummaryStatistics:
    valid: int
    rejected: int
    polled: int
    electors: int

    FIELDS = ['valid', 'rejected', 'polled', 'electors']

    @property
    def p_rejected(self):
        return self.rejected / self.polled

    @property
    def p_valid(self):
        return self.valid / self.polled

    @property
    def p_turnout(self):
        return self.polled / self.electors

    @staticmethod
    def concat(
        summary_statistics_list: list,
    ):
        return SummaryStatistics(
            valid=sum([x.valid for x in summary_statistics_list]),
            rejected=sum([x.rejected for x in summary_statistics_list]),
            polled=sum([x.polled for x in summary_statistics_list]),
            electors=sum([x.electors for x in summary_statistics_list]),
        )

    def to_dict(self):
        return dict(
            valid=self.valid,
            rejected=self.rejected,
            polled=self.polled,
            electors=self.electors,
        )
