code: def checkpoint(
      *collections,
      split_every: float | Literal[False] | None = None,
  ) -> Delayed:
      """Build a :doc:`delayed` which waits until all chunks of the input collection(s)
      have been computed before returning None.
  
      Parameters
      ----------
      collections
          Zero or more Dask collections or nested data structures containing zero or more
          collections
      split_every: int >= 2 or False, optional
          Determines the depth of the recursive aggregation. If greater than the number of
          input keys, the aggregation will be performed in multiple steps; the depth of
          the aggregation graph will be :math:`log_{split_every}(input keys)`. Setting to
          a low value can reduce cache size and network transfers, at the cost of more CPU
          and a larger dask graph.
  
          Set to False to disable. Defaults to 8.
  
      Returns
      -------
      :doc:`delayed` yielding None
      """
      if split_every is None:
          split_every = 8
      elif split_every is not False:
          split_every = int(split_every)
          if split_every < 2:
              raise ValueError(
                  "split_every must be False, None, or >= 2"
              )
  
      collections, _ = unpack_collections(*collections)
      if len(collections) == 1:
          return _checkpoint_one(collections[0], split_every)
      else:
          return delayed(chunks.checkpoint)(
              *(_checkpoint_one(c, split_every) for c in collections)
          )
  
imports: from __future__ import annotations
  import uuid
  from collections.abc import Callable, Hashable
  from typing import Literal, TypeVar
  from dask.base import clone_key, get_collection_names, get_name_from_key, replace_name_in_key, tokenize, unpack_collections
  from dask.blockwise import blockwise
  from dask.core import flatten
  from dask.delayed import Delayed, delayed
  from dask.highlevelgraph import HighLevelGraph, Layer, MaterializedLayer
  from dask.typing import Graph, Key
label_desc: Use image node_id 1 for calling a global function with example usage: checkpoint() and returns: _checkpoint_one, delayed