code: def assert_did_not_materialize(cloned, orig):
      """Test that all layers of the original collection exist in the cloned collection
      too and that Blockwise layers have not been materialized
      """
      olayers = orig.__dask_graph__().layers
      clayers = cloned.__dask_graph__().layers
      for k, v in olayers.items():
          try:
              cv = clayers[k]
          except KeyError:
              cv = clayers[clone_key(k, 0)]
          if isinstance(v, Blockwise):
              assert not v.is_materialized()
              assert not cv.is_materialized()
  
imports: from __future__ import annotations
  import random
  import time
  from operator import add
  import pytest
  import dask
  import dask.bag
  from dask import delayed
  from dask.base import clone_key
  from dask.blockwise import Blockwise
  from dask.graph_manipulation import bind, checkpoint, chunks, clone, wait_on
  from dask.highlevelgraph import HighLevelGraph
  from dask.tests.test_base import Tuple
  from dask.utils_test import import_or_none
label_desc: Use image node_id 2 for calling a global function with example usage: assert_did_not_materialize(cloned, orig) without return types