original_docstring: Produce a graph in dot format to the given stream
docstring: Produce a graph in dot format to the given stream
docstring_tokens: Produce a graph in dot format to the given stream
code: def dump_dot(self, stream):
          """Produce a graph in dot format to the given stream"""
          stream.write('digraph {\n')
          stream.write('    overlap=prism;\n')
          stream.write('    rankdir=LR;\n')
          stream.write('    node [shape=record,style=filled];\n')
  
          # Dump nodes
          for key, type_value in sorted(self.nodes.items()):
              node_type, value = type_value
              color = GRAPH_COLORS.get(node_type)
              if not isinstance(value, GraphvizSafeLabel):
                  logger.error("A label has been added without passing through the sanitizer: (%r, %r, %r)",
                               key, node_type, value)
                  continue
              stream.write('    "{}" [label="{}"'.format(key, value))
              if color is not None:
                  stream.write(',fillcolor="{}"'.format(color))
              stream.write('];\n')
  
          # Dump edges
          for key, edge_label in sorted(self.edges.items()):
              if edge_label in ('member-net', 'subnet'):
                  # Reverse the rank for ip-subnet link
                  stream.write('    "{0[1]}" -> "{0[0]}" [dir="back"];\n'.format(key))
              else:
                  stream.write('    "{0[0]}" -> "{0[1]}";\n'.format(key))
          stream.write('}\n')
code_tokens: def dump_dot ( self , stream ) : stream . write ( 'digraph {\n' ) stream . write ( '    overlap=prism;\n' ) stream . write ( '    rankdir=LR;\n' ) stream . write ( '    node [shape=record,style=filled];\n' ) for key , type_value in sorted ( self . nodes . items ( ) ) : node_type , value = type_value color = GRAPH_COLORS . get ( node_type ) if not isinstance ( value , GraphvizSafeLabel ) : logger . error ( "A label has been added without passing through the sanitizer: (%r, %r, %r)" , key , node_type , value ) continue stream . write ( '    "{}" [label="{}"' . format ( key , value ) ) if color is not None : stream . write ( ',fillcolor="{}"' . format ( color ) ) stream . write ( '];\n' ) for key , edge_label in sorted ( self . edges . items ( ) ) : if edge_label in ( 'member-net' , 'subnet' ) : stream . write ( '    "{0[1]}" -> "{0[0]}" [dir="back"];\n' . format ( key ) ) else : stream . write ( '    "{0[0]}" -> "{0[1]}";\n' . format ( key ) ) stream . write ( '}\n' )
short_docstring: Produce a graph in dot format to the given stream
short_docstring_tokens: Produce a graph in dot format to the given stream
comment: """Produce a graph in dot format to the given stream"""$SEP$# Dump nodes$SEP$# Dump edges$SEP$# Reverse the rank for ip-subnet link