code: def test_reductions_frame_dtypes(func, kwargs, numeric_only):
      if (
          pyarrow_strings_enabled()
          and func == "sum"
          and numeric_only is None
      ):
          pytest.xfail("Known failure with pyarrow strings")
      df = pd.DataFrame(
          {
              "int": [1, 2, 3, 4, 5, 6, 7, 8],
              "float": [1.0, 2.0, 3.0, 4.0, np.nan, 6.0, 7.0, 8.0],
              "dt": [pd.NaT]
              + [datetime(2011, i, 1) for i in range(1, 8)],
              "str": list("abcdefgh"),
              "timedelta": pd.to_timedelta(
                  [1, 2, 3, 4, 5, 6, 7, np.nan]
              ),
              "bool": [True, False] * 4,
          }
      )
  
      if kwargs is None:
          kwargs = {}
  
      if numeric_only is False or numeric_only is None:
          if func in (
              "sum",
              "prod",
              "product",
              "mean",
              "median",
              "std",
              "sem",
              "var",
          ):
              # datetime columns don't support some aggs
              df = df.drop(columns=["dt", "timedelta"])
          if func in ("prod", "product", "mean", "std", "sem", "var"):
              # string columns don't support some other aggs
              df = df.drop(columns=["str"])
  
      if numeric_only is not None:
          kwargs["numeric_only"] = numeric_only
  
      ddf = dd.from_pandas(df, 3)
  
      with check_numeric_only_deprecation():
          expected = getattr(df, func)(**kwargs)
          actual = getattr(ddf, func)(**kwargs)
          assert_eq(expected, 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 18 for calling a global function with example usage: test_reductions_frame_dtypes(func, kwargs, numeric_only) without return types