code: def test_apply_gufunc_check_coredim_chunksize():
      def foo(x):
          return np.sum(x, axis=-1)
  
      a = da.random.default_rng().normal(size=(8,), chunks=3)
      with pytest.raises(ValueError) as excinfo:
          da.apply_gufunc(
              foo,
              "(i)->()",
              a,
              output_dtypes=float,
              allow_rechunk=False,
          )
      assert "consists of multiple chunks" in str(excinfo.value)
  
imports: from __future__ import annotations
  import numpy
  import pytest
  from numpy.testing import assert_equal
  import dask.array
  from dask.array.core import Array
  from dask.array.gufunc import _parse_gufunc_signature, _validate_normalize_axes, apply_gufunc, as_gufunc, gufunc
  from dask.array.utils import assert_eq
label_desc: Use image node_id 31 for calling a global function with example usage: test_apply_gufunc_check_coredim_chunksize() and returns: np