code: def test_filenames_and_formats(
      tmpdir, filename, format, target, expected_result_type
  ):
      result = dot_graph(
          dsk, filename=str(tmpdir.join(filename)), format=format
      )
      assert tmpdir.join(target).exists()
      assert isinstance(result, expected_result_type)
  
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 22 for calling a global function with example usage: test_filenames_and_formats(tmpdir, filename, format, target, expected_result_type) without return types