code: def repo(tmp_dir, dvc):
      tmp_dir.dvc_gen("a", "a")
      tmp_dir.dvc_gen("b", "b")
  
      dvc.run(
          no_exec=True,
          deps=["a", "c"],
          outs=["d", "e"],
          cmd="cmd1",
          name="1",
      )
      dvc.run(
          no_exec=True,
          deps=["b", "c"],
          outs=["f", "g"],
          cmd="cmd2",
          name="2",
      )
      dvc.run(
          no_exec=True,
          deps=["a", "b", "c"],
          outs=["h", "i"],
          cmd="cmd3",
          name="3",
      )
      dvc.run(
          no_exec=True,
          deps=["a", "h"],
          outs=["j"],
          cmd="cmd4",
          name="4",
      )
  
      return dvc
  
file_path: dvc/tests/unit/command/test_dag.py
imports: import networkx
  import pytest
  from dvc.cli import main, parse_args
  from dvc.commands.dag import CmdDAG, _build, _show_ascii, _show_dot, _show_mermaid
label_desc: Use image node_id 2 for calling a global function with example usage: repo(tmp_dir, dvc) and returns: dvc