class_docstr: Converts logical expressions to corresponding TF calls.
class_docstr_tok: ["Converts","logical","expressions","to","corresponding","TF","calls","."]
code: def visit_Compare(self, node):
      node = self.generic_visit(node)
  
      ops_and_comps = list(zip(node.ops, node.comparators))
      left = node.left
  
      # Repeated comparisons are converted to conjunctions:
      #   a < b < c   ->   a < b and b < c
      op_tree = None
      while ops_and_comps:
          op, right = ops_and_comps.pop(0)
          binary_comparison = self._process_binop(op, left, right)
          if op_tree is not None:
              op_tree = self._as_binary_function(
                  "ag__.and_",
                  self._as_lambda(op_tree),
                  self._as_lambda(binary_comparison),
              )
          else:
              op_tree = binary_comparison
          left = right
  
      assert op_tree is not None
      return op_tree
  
file_path: DALI/dali/python/nvidia/dali/_autograph/converters/logical_expressions.py
imports: import gast
  from nvidia.dali._autograph.core import converter
  from nvidia.dali._autograph.pyct import parser
  from nvidia.dali._autograph.pyct import templates
label_desc: Use image node_id 7 for calling the LogicalExpressionTransformer obj's underlying member method code with example usage: obj.visit_Compare(node) and returns: op_tree