def split_group(group):
    """
    Converts a list of objects splitted by "|" into a list. The complication
    comes from the fact that we do not want to use other group's "|" to split
    this one. Meaning (a|(b|c)|e) should be splitted into ['a', '(b|c)', 'e'].
    Warning, this function supposes that there is no parenthesis around the
    given group (it must be under the form "a|(b|c)|e").
    """
    # suppose no parenthesis around group
    parenthesis_level = 0
    last_split_index = 0
    result = []
    for index, char in enumerate(group):
        if char == "(":
            parenthesis_level += 1
        elif char == ")":
            parenthesis_level -= 1
        elif char == "|" and parenthesis_level == 0:
            result.append(group[last_split_index:index])
            last_split_index = index + 1
    result.append(group[last_split_index:])
    return result