code: def test_reductions_numpy_dispatch(axis, redfunc):
      pdf = pd.DataFrame(
          {"a": [1, 2, 3], "b": [4, 5, 6]}, index=[0, 1, 3]
      )
      df = dd.from_pandas(pdf, 3)
      np_redfunc = getattr(np, redfunc)
  
      if redfunc in ("var", "std"):
          # numpy has default ddof value 0 while
          # dask and pandas have 1, so ddof should be passed
          # explicitly when calling np.var(dask)
          expect = np_redfunc(pdf, axis=axis, ddof=1)
          actual = np_redfunc(df, axis=axis, ddof=1)
      elif _numpy_125 and redfunc == "product":
          expect = np_redfunc(pdf, axis=axis)
          with pytest.warns(
              DeprecationWarning, match="`product` is deprecated"
          ):
              actual = np_redfunc(df, axis=axis)
      else:
          expect = np_redfunc(pdf, axis=axis)
          actual = np_redfunc(df, axis=axis)
  
      assert_eq(expect, actual)
  
imports: from __future__ import annotations
  import contextlib
  import warnings
  from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.api.types import is_scalar
  import dask.dataframe
  from dask.array.numpy_compat import _numpy_125
  from dask.dataframe._compat import PANDAS_GE_140, PANDAS_GE_150, PANDAS_GE_200, PANDAS_VERSION, check_numeric_only_deprecation
  from dask.dataframe.utils import assert_dask_graph, assert_eq, make_meta, pyarrow_strings_enabled
label_desc: Use image node_id 12 for calling a global function with example usage: test_reductions_numpy_dispatch(axis, redfunc) without return types