code: def _show_dot(graph: "DiGraph"):
      import io
  
      import networkx as nx
      from networkx.drawing.nx_pydot import write_dot
  
      dot_file = io.StringIO()
  
      nx.relabel_nodes(graph, _quote_label, copy=False)
      write_dot(graph.reverse(), dot_file)
      return dot_file.getvalue()
  
file_path: dvc/dvc/commands/dag.py
imports: from typing import TYPE_CHECKING
  from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.ui import ui
label_desc: Use image node_id 3 for calling a global function with example usage: _show_dot(graph) and returns: dot_file