code: def test_blockwise_diamond_fusion():
      x = da.ones(10, chunks=(5,))
      y = ((x + 1) + 2) + 3
      a = y * 2
      b = y * 3
      c = a + b
      d = ((c + 1) + 2) + 3
  
      dsk = da.optimization.optimize_blockwise(d.dask)
      assert isinstance(dsk, HighLevelGraph)
  
      assert (
          len(
              [
                  layer
                  for layer in dsk.layers.values()
                  if isinstance(layer, Blockwise)
              ]
          )
          == 1
      )
  
imports: from __future__ import annotations
  import collections
  from operator import add
  import numpy
  import pytest
  import dask
  import dask.array
  from dask.array.utils import assert_eq
  from dask.blockwise import _BLOCKWISE_DEFAULT_PREFIX, Blockwise, _unique_dep, index_subs, optimize_blockwise, rewrite_blockwise
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils_test import dec, hlg_layer_topological, inc
label_desc: Use image node_id 6 for calling a global function with example usage: test_blockwise_diamond_fusion() without return types