code: def graphviz_layout(G, prog="neato", root=None):
      """Create node positions using Pydot and Graphviz.
  
      Returns a dictionary of positions keyed by node.
  
      Parameters
      ----------
      G : NetworkX Graph
          The graph for which the layout is computed.
      prog : string (default: 'neato')
          The name of the GraphViz program to use for layout.
          Options depend on GraphViz version but may include:
          'dot', 'twopi', 'fdp', 'sfdp', 'circo'
      root : Node from G or None (default: None)
          The node of G from which to start some layout algorithms.
  
      Returns
      -------
        Dictionary of (x, y) positions keyed by node.
  
      Examples
      --------
      >>> G = nx.complete_graph(4)
      >>> pos = nx.nx_pydot.graphviz_layout(G)
      >>> pos = nx.nx_pydot.graphviz_layout(G, prog="dot")
  
      Notes
      -----
      This is a wrapper for pydot_layout.
      """
      return pydot_layout(G=G, prog=prog, root=root)
  
file_path: networkx/networkx/drawing/nx_pydot.py
imports: from locale import getpreferredencoding
  import networkx
  from networkx.utils import open_file
label_desc: Use image node_id 6 for calling a global function with example usage: graphviz_layout(G, prog, root) and returns: pydot_layout