code: def test_sklearn_col_trans_disallows_hstack_then_block():
      # Test that sklearn ColumnTransformer (to which dask-ml ColumnTransformer
      # delegates) disallows 1-D values.  This shows that if da.hstack were
      # used in dask's ColumnTransformer, the `then` branch in hstack would not
      # be executed because a ValueError is thrown by sklearn before executing
      # that code path.
  
      # This is the same example as above except that `one_d=True`.
      names = ["a", "b", "c"]
      x = dd.from_pandas(
          pd.DataFrame(np.arange(12).reshape(4, 3), columns=names), 2
      )
      features = sklearn.pipeline.Pipeline(
          [
              (
                  "features",
                  sklearn.pipeline.FeatureUnion(
                      [
                          (
                              "ratios",
                              dask_ml.compose.ColumnTransformer(
                                  [
                                      (
                                          "a_b",
                                          SumTransformer(one_d=True),
                                          ["a", "b"],
                                      ),
                                      (
                                          "b_c",
                                          SumTransformer(one_d=True),
                                          ["b", "c"],
                                      ),
                                  ]
                              ),
                          )
                      ]
                  ),
              )
          ]
      )
  
      exp_msg = (
          "The output of the .a_b. transformer should be 2D "
          ".scipy matrix, array, or pandas DataFrame.."
      )
  
      with pytest.raises(ValueError, match=exp_msg) as ex:
          features.fit_transform(x)
  
      cause = ex.traceback[-1]
      place = cause.frame.f_globals["__name__"]
      func = cause.name
      assert place == "sklearn.compose._column_transformer"
      assert func == "_validate_output"
  
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 3 for calling a global function with example usage: test_sklearn_col_trans_disallows_hstack_then_block() without return types