def get_parent_id_list(term_list):
    """Takes a list with string elements of a node, return a list containing string
    identifiers of its parent nodes.
    Args:
        term_list: for example:
        ['id: MI:0000',
         'name: molecular interaction',
         'def: "Controlled vocabularies originally created for protein protein
         interactions, extended to other molecules interactions." [PMID:14755292]',
         'subset: Drugable',
         'subset: PSI-MI_slim']

    Returns:
        id_string_list: a list of string identifiers of its parent nodes. For example:
        ["MI:0013", "MI:1349"]

    """

    id_string_list = []
    for term in term_list:
        # term containining parent information is "is_a: MI:0013 ! biophysical"
        # or "relationship: part_of MI:1349 ! chembl"
        if term.startswith('is_a'):
            id_string_list.append(term.split(' ')[1])
        elif term.startswith('relationship'):
            id_string_list.append(term.split(' ')[2])
        else: continue

    return id_string_list