code: def visualize(dsk, **kwargs):
      """Utility to visualize the raw low level graphs in this tests suite. This
      automatically generates a set of visualizations with different metrics and
      writes them out to a file prefixed by the test name and suffixed by the
      measure used."""
      funcname = inspect.stack()[1][3]
      if hasattr(dsk, "__dask_graph__"):
          dsk = collections_to_dsk([dsk], optimize_graph=True)
  
      node_attrs = {"penwidth": "6"}
      visualize_dsk(
          dsk,
          filename=f"{funcname}.pdf",
          node_attr=node_attrs,
          **kwargs,
      )
      o = order(dsk, return_stats=True)
      visualize_dsk(
          dsk,
          o=o,
          filename=f"{funcname}-order.pdf",
          color="order",
          node_attr=node_attrs,
          cmap="viridis",
          collapse_outputs=False,
          **kwargs,
      )
      visualize_dsk(
          dsk,
          o=o,
          filename=f"{funcname}-age.pdf",
          color="age",
          node_attr=node_attrs,
          cmap="Reds",
          collapse_outputs=False,
          **kwargs,
      )
      visualize_dsk(
          dsk,
          o=o,
          filename=f"{funcname}-pressure.pdf",
          color="memorypressure",
          node_attr=node_attrs,
          cmap="Reds",
          collapse_outputs=False,
          **kwargs,
      )
      visualize_dsk(
          dsk,
          o=o,
          filename=f"{funcname}-cpath.pdf",
          color="cpath",
          node_attr=node_attrs,
          collapse_outputs=False,
          **kwargs,
      )
  
imports: from __future__ import annotations
  import inspect
  import pytest
  import dask
  from dask import delayed
  from dask.base import collections_to_dsk, key_split, visualize_dsk
  from dask.core import get_deps
  from dask.order import _connecting_to_roots, diagnostics, ndependencies, order
  from dask.utils_test import add, inc
label_desc: Use image node_id 3 for calling a global function with example usage: visualize(dsk) without return types