code: def load_cluster_dump(url: str, **kwargs: Any) -> dict:
      """Loads a cluster dump from a disk artefact
  
      Parameters
      ----------
      url : str
          Name of the disk artefact. This should have either a
          ``.msgpack.gz`` or ``yaml`` suffix, depending on the dump format.
      **kwargs :
          Extra arguments passed to :func:`fsspec.open`.
  
      Returns
      -------
      state : dict
          The cluster state at the time of the dump.
      """
      if url.endswith(".msgpack.gz"):
          mode = "rb"
          reader = msgpack.unpack
      elif url.endswith(".yaml"):
          import yaml
  
          mode = "r"
          reader = yaml.safe_load
      else:
          raise ValueError(
              f"url ({url}) must have a .msgpack.gz or .yaml suffix"
          )
  
      kwargs.setdefault("compression", "infer")
      # This module is the only place where fsspec is used and it is a relatively
      # heavy import. Do lazy import to reduce import time
      import fsspec
  
      with fsspec.open(url, mode, **kwargs) as f:
          return reader(f)
  
imports: from __future__ import annotations
  import asyncio
  from collections import defaultdict
  from collections.abc import Awaitable, Callable, Collection, Mapping
  from pathlib import Path
  from typing import IO, Any, Literal
  import msgpack
  from dask.typing import Key
  from distributed._stories import scheduler_story
  from distributed._stories import worker_story
label_desc: Use image node_id 2 for calling a global function with example usage: load_cluster_dump(url) and returns: reader