code: def test_frame_strategies(daskify, strategy):
      if strategy == "most_frequent" and PANDAS_1_2_0:
          raise pytest.skip("Behavior change in pandas. Unclear.")
      df = pd.DataFrame({"A": [1, 1, np.nan, np.nan, 2, 2]})
      if daskify:
          df = dd.from_pandas(df, 2)
  
      if strategy == "constant":
          fill_value = 2
      else:
          fill_value = None
  
      b = dask_ml.impute.SimpleImputer(
          strategy=strategy, fill_value=fill_value
      )
      b.fit(df)
      if not daskify and strategy == "median":
          expected = pd.Series([1.5], index=["A"])
      elif daskify and strategy == "median" and DASK_2_26_0:
          # New quantile implementation in Dask
          expected = pd.Series([1.0], index=["A"])
      else:
          expected = pd.Series([2], index=["A"])
      tm.assert_series_equal(b.statistics_, expected, check_dtype=False)
  
file_path: dask-ml/tests/test_impute.py
imports: import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import pandas.testing
  import pytest
  import sklearn.impute
  import dask_ml.datasets
  import dask_ml.impute
  from dask_ml._compat import DASK_2_26_0, PANDAS_1_2_0
  from dask_ml.utils import assert_estimator_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_frame_strategies(daskify, strategy) without return types