code: def test_apply_gufunc_check_same_dimsizes():
      def foo(x, y):
          return x + y
  
      rng = da.random.default_rng()
      a = rng.normal(size=(3,), chunks=(2,))
      b = rng.normal(size=(4,), chunks=(2,))
  
      with pytest.raises(ValueError) as excinfo:
          apply_gufunc(
              foo,
              "(),()->()",
              a,
              b,
              output_dtypes=float,
              allow_rechunk=True,
          )
      assert "different lengths in arrays" 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 30 for calling a global function with example usage: test_apply_gufunc_check_same_dimsizes() and returns: unknown