def get_xref_mcf(xrefs, xref_to_label):
    """Returns the mcf format of a given string of xrefs.

    Convert a list of xrefs to their mcf format of <prop_label>: <prop_text_value>
    using the xref_to_label dict to lookup the property label of the given
    indentifier. For this import, xref_to_label is either GENE_XREF_PROP_DICT or
    DRUG_XREF_PROP_DICT from config.py .

    Args:
        xref: a string representing a comma-separated list of xrefs enclosed by
            double quotes
        xref_to_label: xref name in pahrmgkb to DC property label mapping

    Returns:
        a multiline mcf formatted string of all of the xrefs' prop labels + values
    """

    xref_mcf = ''
    if not xrefs:
        return ''
    for xref in xrefs.split(','):
        xref_pair = xref.replace('"', '').strip().split(':')
        if xref_pair[0] not in xref_to_label:
            print('unexpected format in gene xrefs:' + xrefs)
            continue
        prop_label = xref_to_label[xref_pair[0]]
        prop_value = ':'.join(xref_pair[1:]).strip()
        xref_mcf += prop_label + ': "' + prop_value + '"\n'
    return xref_mcf