code: def test_ufunc_with_reduction(redfunc, ufunc, pandas):
      dask = dd.from_pandas(pandas, 3)
  
      np_redfunc = getattr(np, redfunc)
      np_ufunc = getattr(np, ufunc)
  
      if (
          redfunc == "prod"
          and ufunc in ["conj", "square", "negative", "absolute"]
          and isinstance(pandas, pd.DataFrame)
      ):
          # TODO(pandas) follow pandas behaviour?
          # starting with pandas 1.2.0, the ufunc is applied column-wise, and therefore
          # applied on the integer columns separately, overflowing for those columns
          # (instead of being applied on 2D ndarray that was converted to float)
          pytest.xfail(
              "'prod' overflowing with integer columns in pandas 1.2.0"
          )
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", RuntimeWarning)
          warnings.simplefilter("ignore", FutureWarning)
          assert isinstance(
              np_redfunc(dask),
              (dd.DataFrame, dd.Series, dd.core.Scalar),
          )
          assert_eq(
              np_redfunc(np_ufunc(dask)), np_redfunc(np_ufunc(pandas))
          )
  
file_path: dask/dask/dataframe/tests/test_ufunc.py
imports: from __future__ import annotations
  import warnings
  import pytest
  import numpy
  import dask.array
  import dask.dataframe
  from dask.dataframe.utils import assert_eq
label_desc: Use image node_id 10 for calling a global function with example usage: test_ufunc_with_reduction(redfunc, ufunc, pandas) without return types