code: def sanitize_dsk(dsk: MutableMapping[Key, Any]) -> dict:
      """Take a dask graph and replace callables with a dummy function and remove
      payload data like numpy arrays, dataframes, etc.
      """
      new = {}
      for key, values in dsk.items():
          new_key = key
          new[new_key] = _convert_task(values)
      if get_deps(new) != get_deps(dsk):
          # The switch statement in _convert likely dropped some keys
          raise RuntimeError(
              "Sanitization failed to preserve topology."
          )
      return new
  
file_path: dask/dask/order.py
imports: from __future__ import annotations
  import copy
  from collections import defaultdict, deque, namedtuple
  from collections.abc import Iterable, Mapping, MutableMapping
  from typing import Any, Callable, Literal, NamedTuple, overload
  from dask.core import get_dependencies, get_deps, getcycle, istask, reverse_dict
  from dask.typing import Key
label_desc: Use image node_id 9 for calling a global function with example usage: sanitize_dsk(dsk) and returns: new