Returns a list from [ott_id, ott_id's par, ..., root ott_id]

def create_anc_lineage_from_id2par(id2par_id, ott_id):
    """Returns a list from [ott_id, ott_id's par, ..., root ott_id]"""
    curr = ott_id
    n = id2par_id.get(curr)
    if n is None:
        raise KeyError('The OTT ID {} was not found'.format(ott_id))
    lineage = [curr]
    while n is not None:
        lineage.append(n)
        n = id2par_id.get(n)
    return lineage