def _election_slug(self, election):
        """
        Generate a slug for an election.

        Args:
            election: Dictionary of election attributes as returned by the
                 metadata API.

        Returns:
            A string containing a unique identifier for an election.  For
            example, "ar-2012-05-22-primary".

        """
        # 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  __HOLE__:
            pass
        return election_slug(self.state, **election_attrs)
dataset/ETHPy150Open openelections/openelections-core/openelex/base/datasource.py/BaseDatasource._election_slug