code: def test_graph(self, tmp_dir, dvc):
      tmp_dir.gen("foo", "foo")
      dvc.run(
          deps=["foo"],
          outs=["bar.txt"],
          cmd="echo bar > bar.txt",
          name="gen-bar-txt",
      )
  
      dvc.run(
          deps=["bar.txt"],
          outs=["baz.txt"],
          cmd="echo baz > baz.txt",
          name="gen-baz-txt",
      )
  
      with pytest.raises(CyclicGraphError):
          dvc.run(
              deps=["baz.txt"],
              outs=["foo"],
              cmd="echo baz > foo",
              name="gen-foo",
          )
  
imports: import logging
  import os
  import textwrap
  import uuid
  import pytest
  from funcy import get_in
  from dvc.cli import main
  from dvc.dependency import ParamsDependency
  from dvc.dependency.base import DependencyDoesNotExistError
  from dvc.dvcfile import LOCK_FILE, PROJECT_FILE, load_file
  from dvc.exceptions import ArgumentDuplicationError, CircularDependencyError, CyclicGraphError, InvalidArgumentError, OutputDuplicationError, OverlappingOutputPathsError
  from dvc.stage import PipelineStage
  from dvc.stage.exceptions import DuplicateStageName, InvalidStageName, StagePathNotDirectoryError, StagePathNotFoundError, StagePathOutsideError
  from dvc.utils.serialize import load_yaml
label_desc: Use image node_id 4 for calling the TestRunCircularDependency obj's underlying member method code with example usage: obj.test_graph(tmp_dir, dvc) without return types