code: def test_apply_gufunc_output_dtypes_string(vectorize):
      def stats(x):
          return np.mean(x, axis=-1)
  
      a = da.random.default_rng().normal(
          size=(10, 20, 30), chunks=(5, 5, 30)
      )
      mean = apply_gufunc(
          stats, "(i)->()", a, output_dtypes="f", vectorize=vectorize
      )
      assert mean.compute().shape == (10, 20)
  
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 9 for calling a global function with example usage: test_apply_gufunc_output_dtypes_string(vectorize) and returns: np