code: def test_general_reduction_names():
      dtype = int
      a = da.reduction(
          da.ones(10, dtype, chunks=2),
          np.sum,
          np.sum,
          dtype=dtype,
          name="foo",
      )
      names, tokens = list(
          zip_longest(*[key[0].rsplit("-", 1) for key in a.dask])
      )
      assert set(names) == {
          "ones_like",
          "foo",
          "foo-partial",
          "foo-aggregate",
      }
      assert all(tokens)
  
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 28 for calling a global function with example usage: test_general_reduction_names() without return types