code: def test_dot_graph(tmpdir, format, typ):
      # Use a name that the shell would interpret specially to ensure that we're
      # not vulnerable to shell injection when interacting with `dot`.
      filename = str(tmpdir.join("$(touch should_not_get_created.txt)"))
  
      target = ".".join([filename, format])
      ensure_not_exists(target)
      try:
          result = dot_graph(dsk, filename=filename, format=format)
  
          assert not os.path.exists("should_not_get_created.txt")
          assert os.path.isfile(target)
          assert isinstance(result, typ)
      finally:
          ensure_not_exists(target)
  
imports: from __future__ import annotations
  import copy
  import os
  import re
  import sys
  from functools import partial
  from operator import add, neg
  import pytest
  from dask.dot import _to_cytoscape_json, cytoscape_graph
  from dask import delayed
  from dask.utils import ensure_not_exists
label_desc: Use image node_id 18 for calling a global function with example usage: test_dot_graph(tmpdir, format, typ) without return types