code: def graphviz_layout(G, prog="neato", root=None, args=""):
      """Create node positions for G using Graphviz.
  
      Parameters
      ----------
      G : NetworkX graph
        A graph created with NetworkX
      prog : string
        Name of Graphviz layout program
      root : string, optional
        Root node for twopi layout
      args : string, optional
        Extra arguments to Graphviz layout program
  
      Returns
      -------
      Dictionary of x, y, positions keyed by node.
  
      Examples
      --------
      >>> G = nx.petersen_graph()
      >>> pos = nx.nx_agraph.graphviz_layout(G)
      >>> pos = nx.nx_agraph.graphviz_layout(G, prog="dot")
  
      Notes
      -----
      This is a wrapper for pygraphviz_layout.
  
      Note that some graphviz layouts are not guaranteed to be deterministic,
      see https://gitlab.com/graphviz/graphviz/-/issues/1767 for more info.
      """
      return pygraphviz_layout(G, prog=prog, root=root, args=args)
  
file_path: networkx/networkx/drawing/nx_agraph.py
imports: import os
  import tempfile
  import networkx
label_desc: Use image node_id 5 for calling a global function with example usage: graphviz_layout(G, prog, root, args) and returns: pygraphviz_layout