def _check_if_found(new_term: str, targets: list) -> bool:
    """
    Checks if `new_term` matches `targets`.

    :param new_term: string to check
    :param targets: list of strings to match to `new_term`. Targets can be a list of specific targets, e.g.
        ['UBERON:123219', 'UBERON:1288990'] or of general ontology prefixes, e.g. ['UBERON']
    :return:
    """

    if (':' in targets[0]) and (new_term in targets):  # specific
        relation_found = True
    elif (':' not in targets[0]) and (new_term.split(':')[0] in targets):  # general
        relation_found = True
    else:
        relation_found = False

    return relation_found