def _election_slug(self, election):
        # Delete the 'state' key in the election attrs, because its a
        # dict with multiple values we don't care about and we want
        # to just pass the value of self.state to election_slug.
        # We can probably delete the key from argument without consequence,
        # but to be safe and avoid side effects,copy the argument first.
        election_attrs = election.copy()
        try:
            del election_attrs['state']
        except  KeyError:
            pass
        return election_slug(self.state, **election_attrs)
Generate a slug for an election.
dataset/ETHPy150Open openelections/openelections-core/openelex/base/datasource.py/BaseDatasource._election_slug