code: def test_chunk_structure_independence(axes, split_every, chunks):
      # Reducing an array should not depend on its chunk-structure!!!
      # See Issue #8541: https://github.com/dask/dask/issues/8541
      shape = tuple(np.sum(s) for s in chunks)
      np_array = np.arange(np.prod(shape)).reshape(*shape)
      x = da.from_array(np_array, chunks=chunks)
      reduced_x = da.reduction(
          x,
          lambda x, axis, keepdims: x,
          lambda x, axis, keepdims: x,
          keepdims=True,
          axis=axes,
          split_every=split_every,
          dtype=x.dtype,
          meta=x._meta,
      )
      assert_eq(
          reduced_x, np_array, check_chunks=False, check_shape=False
      )
  
imports: from __future__ import annotations
  import os
  import warnings
  from contextlib import nullcontext
  from itertools import permutations, zip_longest
  import pytest
  import itertools
  import dask.array
  import dask.config
  from dask.array.numpy_compat import ComplexWarning, _numpy_122
  from dask.array.utils import assert_eq, same_keys
  from dask.core import get_deps
label_desc: Use image node_id 44 for calling a global function with example usage: test_chunk_structure_independence(axes, split_every, chunks) without return types