code: def test_reductions_frame_dtypes_numeric_only(func):
      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,
          }
      )
  
      ddf = dd.from_pandas(df, 3)
      kwargs = {"numeric_only": True}
  
      assert_eq(
          getattr(df, func)(**kwargs),
          getattr(ddf, func)(**kwargs),
      )
      with pytest.raises(
          NotImplementedError, match="'numeric_only=False"
      ):
          getattr(ddf, func)(numeric_only=False)
  
      assert_eq(df.sem(ddof=0, **kwargs), ddf.sem(ddof=0, **kwargs))
      assert_eq(df.std(ddof=0, **kwargs), ddf.std(ddof=0, **kwargs))
      assert_eq(df.var(ddof=0, **kwargs), ddf.var(ddof=0, **kwargs))
      assert_eq(
          df.var(skipna=False, **kwargs),
          ddf.var(skipna=False, **kwargs),
      )
      assert_eq(
          df.var(skipna=False, ddof=0, **kwargs),
          ddf.var(skipna=False, ddof=0, **kwargs),
      )
  
      # ------ only include numerics columns ------ #
      assert_eq(df._get_numeric_data(), ddf._get_numeric_data())
  
      df_numerics = df[["int", "float", "bool"]]
      ddf_numerics = ddf[["int", "float", "bool"]]
  
      assert_eq(df_numerics, ddf._get_numeric_data())
      assert ddf_numerics._get_numeric_data().dask == ddf_numerics.dask
  
      assert_eq(
          getattr(df_numerics, func)(),
          getattr(ddf_numerics, func)(),
      )
  
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 21 for calling a global function with example usage: test_reductions_frame_dtypes_numeric_only(func) without return types