def get_ancestors_operator(t, until, include_until = True):
    """
    Given an XOR block and lowest common ancestor(LCA), 
    the method returns all operators present in the path from XOR branch to LCA, adapted from PM4Py.
    
    Parameter:
        t (ProcessTree) : Source XOR block 
        until (ProcessTree) : LCA of those XOR blocks
    
    Returns:
        ancestors (Operator): All operators present in the path from XOR block to the given LCA
    """
    ancestors = list()
    if t == until:
        return ancestors
    parent = t.parent
    while parent != until:
        ancestors.append(parent.operator)
        parent = parent.parent
        if parent is None:
            return None
    if include_until:
        ancestors.append(until.operator)
    return ancestors