code: def block_to_graphviz_string(block=None, namer=_graphviz_default_namer):
      
      graph = net_graph(block, split_state=True)
      node_index_map = {}  # map node -> index
  
      rstring = """\
                digraph g {\n
                graph [splines="spline"];
                node [shape=circle, style=filled, fillcolor=lightblue1,
                      fontcolor=grey, fontname=helvetica, penwidth=0,
                      fixedsize=true];
                edge [labelfloat=false, penwidth=2, color=deepskyblue, arrowsize=.5];
                """
  
      # print the list of nodes
      for index, node in enumerate(graph):
          label = namer(node, is_edge=False)
          rstring += '    n%s %s;\n' % (index, label)
          node_index_map[node] = index
  
      # print the list of edges
      for _from in graph:
          for _to in graph[_from]:
              from_index = node_index_map[_from]
              to_index = node_index_map[_to]
              edge = graph[_from][_to]
              is_to_splitmerge = True if hasattr(_to, 'op') and _to.op in 'cs' else False
              label = namer(edge, is_to_splitmerge=is_to_splitmerge)
              rstring += '   n%d -> n%d %s;\n' % (from_index, to_index, label)
  
      rstring += '}\n'
      return rstring
docs: Return a graphviz string for the block.