

def buildComparisonNode(provider, node, source_ref):
    assert (len(node.comparators) == len(node.ops))
    left = buildNode(provider, node.left, source_ref)
    rights = [buildNode(provider, comparator, source_ref) for comparator in node.comparators]
    comparators = [getKind(comparator) for comparator in node.ops]
    if (len(rights) == 1):
        return makeComparisonNode(left=left, right=rights[0], comparator=comparators[0], source_ref=source_ref)
    return buildComplexComparisonNode(provider, left, rights, comparators, source_ref)

dataset/ETHPy150Open kayhayen/Nuitka/nuitka/tree/ReformulationComparisonExpressions.py buildComparisonNode/original