code: def test_optimize_blockwise_duplicate_dependency(optimize_graph):
      # Two blockwise operations in a row with duplicate name
      # (See: https://github.com/dask/dask/issues/8535)
      xx = da.from_array(np.array([[1, 1], [2, 2]]), chunks=1)
      xx = xx * 2
      z = da.matmul(xx, xx)
  
      # Compare to known answer
      result = z.compute(optimize_graph=optimize_graph)
      assert assert_eq(result, [[12, 12], [24, 24]])
  
imports: from __future__ import annotations
  import pytest
  import numpy
  import dask
  import dask.array
  from dask.array.chunk import getitem
  from dask.array.core import getter
  from dask.array.core import getter_nofancy
  from dask.array.optimization import _is_getter_task, fuse_slice, optimize, optimize_blockwise, optimize_slices
  from dask.array.utils import assert_eq
  from dask.highlevelgraph import HighLevelGraph
  from dask.optimization import SubgraphCallable, fuse
  from dask.utils import SerializableLock
label_desc: Use image node_id 28 for calling a global function with example usage: test_optimize_blockwise_duplicate_dependency(optimize_graph) without return types