def get_index_from_alias(alias_name, index_client=None):
index_client = index_client or indices_client()<EOL>if not index_client.exists_alias(name=alias_name):<EOL><INDENT>return None<EOL><DEDENT>return list(index_client.get_alias(name=alias_name).keys())[<NUM_LIT:0>]<EOL>
Retrieve the base index name from an alias

    Args:
        alias_name (str) Name of the alias
        index_client (Elasticsearch.IndicesClient) an Elasticsearch index
            client. Optional, will create one if not given

    Returns: (str) Name of index