def visit_BinOp(self, node):
        # we have to add parens around any immediate BinOp child
        # that has a lower precedence operation than we do
        if isinstance(node.left, ast.BinOp) and _pred_cmp(node.left.op, node.op) < 0:
            self.append('(')
            self.visit(node.left)
            self.append(')')
        else:
            self.visit(node.left)
        self.visit(node.op)
        if isinstance(node.right, ast.BinOp):
            pred_comp = _pred_cmp(node.right.op, node.op)
            # Subtraction isn't commutative, so when the operator precedence
            # is equal, we still need parentheses.
            if 0 < pred_comp or \
              (pred_comp == 0 and (isinstance(node.op, ast.Sub) or isinstance(node.op, ast.Div))):
                self.append('(')
                self.visit(node.right)
                self.append(')')
            else:
                self.visit(node.right)
        else:
            self.visit(node.right)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/printexpr.py/ExprPrinter.visit_BinOp/swapped operands of `<`