def group_markers(markers, or_=False):
    groups = [[]]
    for marker in markers:
        if or_:
            groups.append([])
        if isinstance(marker, (MultiMarker, MarkerUnion)):
            groups[(- 1)].append(group_markers(marker.markers, isinstance(marker, MarkerUnion)))
        elif isinstance(marker, SingleMarker):
            (lhs, op, rhs) = (marker.name, marker.operator, marker.value)
            groups[(- 1)].append((lhs, op, rhs))
    return groups
def group_markers(markers, or_=False):
    groups = [[]]
    for marker in markers:
        if or_:
            groups.append([])
        if isinstance(marker, (MultiMarker, MarkerUnion)):
            groups[(- 1)].append(group_markers(marker.markers, isinstance(marker, MarkerUnion)))
        elif isinstance(marker, SingleMarker):
            (lhs, op, rhs) = (marker.name, marker.operator, marker.value)
            groups[(- 1)].append((lhs, op, rhs))
    return groups