code: def test_reductions_with_empty_array():
      dx1 = da.ones((10, 0, 5), chunks=4)
      x1 = dx1.compute()
      dx2 = da.ones((0, 0, 0), chunks=4)
      x2 = dx2.compute()
  
      for dx, x in [(dx1, x1), (dx2, x2)]:
          with warnings.catch_warnings():
              warnings.simplefilter(
                  "ignore", RuntimeWarning
              )  # Mean of empty slice
              assert_eq(dx.mean(), x.mean())
              assert_eq(dx.mean(axis=()), x.mean(axis=()))
              assert_eq(dx.mean(axis=0), x.mean(axis=0))
              assert_eq(dx.mean(axis=1), x.mean(axis=1))
              assert_eq(dx.mean(axis=2), x.mean(axis=2))
  
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 23 for calling a global function with example usage: test_reductions_with_empty_array() without return types