def __init__(self, election_type, date):
if election_type == '<STR_LIT>':<EOL><INDENT>raise NotImplementedError()<EOL><DEDENT>if election_type == '<STR_LIT>':<EOL><INDENT>raise NotImplementedError()<EOL><DEDENT>self._validate_election_type(election_type)<EOL>self.election_type = election_type<EOL>self.spec = RULES[self.election_type]<EOL>self.date = self._format_date(date)<EOL>self.subtype = None<EOL>self.organisation = None<EOL>self.division = None<EOL>self.contest_type = None<EOL>
Constructor

        Args:
            election_type (str): May be one of
                ``['sp', 'nia', 'pcc', 'naw', 'parl', 'local', 'gla', 'mayor']``
            date (date|str): May be either a python date object,
                or a string in 'Y-m-d' format.
                ``myid = IdBuilder('local', date(2018, 5, 3))`` and
                ``myid = IdBuilder('local', '2018-05-03'))``
                are functionally equivalent invocations.

        Returns:
            IdBuilder