class_docstr: Generates a dot description of a graph in dictionary form.
code: def visit(self, graph, node, nodename_prefix=""):
      if node.name in self.visited_memo:
          return self
  
      # For printing datatype, breaks type
      if node.attr.get("symbolic_datatype", None) is not None:
          dtype = str(
              types.get_type_info(node.attr["symbolic_datatype"])
          )
      elif node.datatype is not None:
          dtype = str(types.get_type_info(node.datatype))
      else:
          dtype = "Unknown"
  
      label = ""
      if self.alternate_labeller is not None:
          label = self.alternate_labeller(node)
      else:
          if len(node.outputs) == 0:
              label = "\\n{" + node.name + "}"
          if "Placeholder" in node.op:
              label = "\\n{" + node.name + "}"
          if node.op == "while":
              label = (
                  "\\n{body: "
                  + node.attr["body_function"]
                  + " cond:"
                  + node.attr["cond_function"]
                  + "}"
              )
          if node.op == "function":
              label = "\\n{body: " + node.attr["function_name"] + "}"
          if node.op == "function_entry":
              label = "\\n{" + node.name + "}"
          label = node.op + ":" + dtype + label
  
      if node.name in self.highlights:
          self.result.append(
              '"'
              + nodename_prefix
              + node.name
              + '"'
              + '[label="'
              + label
              + '",fillcolor=%s,style=filled,fontcolor=%s]'
              % (
                  self.highlights[node.name],
                  "violetred"
                  if node.attr.get(self.annotation, False)
                  else "black",
              )
          )
      else:
          self.result.append(
              '"'
              + nodename_prefix
              + node.name
              + '"'
              + '[label="'
              + label
              + '",fontcolor=%s]'
              % (
                  "violetred"
                  if node.attr.get(self.annotation, False)
                  else "black"
              )
          )
  
      for i in node.inputs:
          input_name = i
          edge = (
              '"'
              + nodename_prefix
              + input_name
              + '"'
              + " -> "
              + '"'
              + nodename_prefix
              + node.name
              + '"'
          )
          self.result.append(edge)
  
      for i in node.control_inputs:
          input_name = i
          edge = (
              '"'
              + nodename_prefix
              + input_name
              + '"'
              + " -> "
              + '"'
              + nodename_prefix
              + node.name
              + '"'
          )
          edge = edge + " [style=dotted]"
          self.result.append(edge)
  
      self.visited_memo[node.name] = 1
  
      for i in node.inputs:
          input_name = i
          if input_name[0] == "^":
              input_name = input_name[1:]
          assert input_name in graph
          self.visit(graph, graph[input_name], nodename_prefix)
      return self
  
file_path: coremltools/coremltools/converters/mil/frontend/tensorflow/dot_visitor.py
imports: from coremltools.converters.mil.mil import types
label_desc: Use image node_id 4 for calling the DotVisitor obj's underlying member method code with example usage: obj.visit(graph, node, nodename_prefix) and returns: self, self