def get_enum(key_list, enum_dict):
    """Returns the mcf format of enum dcid list that represents a given value(s).

    Used to convert a list of values which map to enums to their appropriate
    enum dcid, as given by the enum_dict. For this import, enum_dict is either
    ASSOCIATION_ENUM_DICT or EVIDENCE_ENUM_DICT from config.py .

    Args:
        key_list: a string representing a comma-separated list of enum mapping
            values
        enum_dict: value to enum dcid mapping, each item of key_list should be a
            key

    Returns:
        a string representing a comma separated list of enum dcids with the 'dcid'
        context indentifier.
    """
    if not key_list:
        return ''
    formatted_enums = ''
    for key in key_list.split(','):
        formatted_enums += 'dcid:' + enum_dict[key] + ','
    return formatted_enums.strip(',')