def epacems_year_and_state(etl_params):
    """Find the year and state defined in pudl/package_data/settings/etl_*.yml."""
    # the etl_params data structure alternates dicts and lists so indexing is a pain.
    epacems = [item for item in etl_params['datapkg_bundle_settings']
               [0]['datasets'] if 'epacems' in item.keys()]
    epacems = epacems[0]['epacems']
    return {'years': epacems['epacems_years'], 'states': epacems['epacems_states']}