class_docstr: Visitor to produce a human readable string for a graph.
code: def visit(self, operation_def, input_nodes) -> Tuple[pydot.Node, ...]:
      num_outputs = operation_def.num_outputs
      node_name = operation_def.label
  
      display_label_rows = [operation_def.__class__.__name__] + [
          _escape(
              "%s: %s" % (field, operation_def.get_field_str(field))
          )
          for field in operation_def._fields
      ]
  
      if operation_def.is_partitionable:
          display_label_rows.append("partitionable: %s" % True)
  
      if num_outputs != 1:
          ports = "|".join(
              "<{0}>{0}".format(idx) for idx in range(num_outputs)
          )
          display_label_rows.append("{%s}" % ports)
      display_label = "{%s}" % "|".join(display_label_rows)
  
      node = pydot.Node(node_name, label=display_label)
  
      self._dot_graph.add_node(node)
  
      for input_node in input_nodes:
          self._dot_graph.add_edge(pydot.Edge(input_node, node))
  
      if num_outputs == 1:
          return (node,)
      else:
          return tuple(
              pydot.Node(
                  obj_dict={"name": '"{}":{}'.format(node_name, idx)}
              )
              for idx in range(num_outputs)
          )
  
imports: import abc
  import collections
  import dataclasses
  from typing import Any, Collection, Dict, List, Optional, Tuple
  import pydot
label_desc: Use image node_id 3 for calling the _PrintGraphVisitor obj's underlying member method code with example usage: obj.visit(operation_def, input_nodes) and returns: node, tuple