<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_terms_index(es, index_name: str):
 """Create terms index"""


    with open(mappings_terms_fn, "r") as f:
        mappings_terms = yaml.load(f, Loader=yaml.SafeLoader)

    try:
        es.indices.create(index=index_name, body=mappings_terms)

    except Exception as e:
        log.error(f"Could not create elasticsearch terms index: {e}")