def mapping_for_file(self, filename):
        """Get the mapping for a generated filename"""
        year = self._filename_year(filename)
        try:
            return next(m for m in self.mappings(year)
                        if m['generated_filename'] == filename)
        except __HOLE__:
            msg = "Mapping for standardized filename {} could not be found"
            msg = msg.format(filename)
            raise LookupError(msg)
dataset/ETHPy150Open openelections/openelections-core/openelex/base/datasource.py/BaseDatasource.mapping_for_file