code: def test_column_transformer():
      # Ordering of make_column_transformer was changed from
      # (columns, transformer) to (transformer, columns) in version 0.20.1 of scikit-learn
      # See https://github.com/scikit-learn/scikit-learn/pull/12626
      if SK_VERSION < packaging.version.parse("0.20.1"):
          a = sklearn.compose.make_column_transformer(
              (
                  ["A"],
                  sklearn.preprocessing.OneHotEncoder(
                      sparse_output=False
                  ),
              ),
              (["B"], sklearn.preprocessing.StandardScaler()),
          )
          b = dask_ml.compose.make_column_transformer(
              (
                  ["A"],
                  dask_ml.preprocessing.OneHotEncoder(
                      sparse_output=False
                  ),
              ),
              (["B"], dask_ml.preprocessing.StandardScaler()),
          )
      else:
          a = sklearn.compose.make_column_transformer(
              (
                  sklearn.preprocessing.OneHotEncoder(
                      sparse_output=False
                  ),
                  ["A"],
              ),
              (sklearn.preprocessing.StandardScaler(), ["B"]),
          )
          b = dask_ml.compose.make_column_transformer(
              (
                  dask_ml.preprocessing.OneHotEncoder(
                      sparse_output=False
                  ),
                  ["A"],
              ),
              (dask_ml.preprocessing.StandardScaler(), ["B"]),
          )
  
      a.fit(df)
      b.fit(ddf)
  
      expected = a.transform(df)
      with pytest.warns(None):
          result = b.transform(ddf)
  
      assert isinstance(result, dd.DataFrame)
      expected = pd.DataFrame(
          expected, index=result.index, columns=result.columns
      )
      dd.utils.assert_eq(result, expected)
  
      # fit-transform
      result = clone(b).fit_transform(ddf)
      expected = clone(a).fit_transform(df)
      expected = pd.DataFrame(
          expected, index=result.index, columns=result.columns
      )
      dd.utils.assert_eq(result, expected)
  
imports: import dask.dataframe
  import numpy
  import packaging.version
  import pandas
  import pytest
  import sklearn.compose
  import sklearn.pipeline
  import sklearn.preprocessing
  from sklearn.base import BaseEstimator, clone
  import dask_ml.compose
  import dask_ml.preprocessing
  from dask_ml._compat import SK_VERSION
label_desc: Use image node_id 1 for calling a global function with example usage: test_column_transformer() without return types