code: def test_feature_union(X):
      """Tests PandasFeatureUnion on simple projection
      Inspired by sklearn/tests/test_pipeline.py"""
      # basic sanity check for feature union
      select_value = ColumnSelector(column_names=[VALUE_COL])
      select_actual = ColumnSelector(column_names=[ACTUAL_COL])
      select_time = ColumnSelector(column_names=[TIME_COL])
      fs = PandasFeatureUnion(
          [
              ("select_value", select_value),
              ("select_actual", select_actual),
              ("select_time", select_time),
              ("select_time_again", select_time),
          ]
      )
  
      fs.fit(X)
      X_transformed = fs.transform(X)
  
      assert X_transformed.shape == (X.shape[0], 4)
      # note that columns are selected in the order specified. There is no column renaming by default
      assert np.all(
          X_transformed.columns.values
          == np.array([VALUE_COL, ACTUAL_COL, TIME_COL, TIME_COL])
      )
      assert X_transformed.equals(
          pd.concat(
              [
                  X[[VALUE_COL]],
                  X[[ACTUAL_COL]],
                  X[[TIME_COL]],
                  X[[TIME_COL]],
              ],
              axis=1,
          )
      )
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.metrics import mean_squared_error
  from sklearn.pipeline import Pipeline
  from greykite.common.constants import ACTUAL_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.python_utils import assert_equal
  from greykite.sklearn.estimator.null_model import DummyEstimator
  from greykite.sklearn.estimator.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.transform.column_selector import ColumnSelector
  from greykite.sklearn.transform.difference_based_outlier_transformer import DifferenceBasedOutlierTransformer
  from greykite.sklearn.transform.null_transformer import NullTransformer
  from greykite.sklearn.transform.pandas_feature_union import PandasFeatureUnion
  from greykite.sklearn.transform.zscore_outlier_transformer import ZscoreOutlierTransformer
label_desc: Use image node_id 4 for calling a global function with example usage: test_feature_union(X) without return types