code: def test_BuildTimeseriesFeaturesTransformer_2():
      """Manually checks if the transformer class returns are correct"""
      df = pd.DataFrame(
          {
              "time": [
                  datetime(2018, 1, 1, 1, 0, 1),
                  datetime(2018, 1, 2, 2, 0, 2),
                  datetime(
                      2018, 1, 3, 4, 0, 10
                  ),  # intentionally out of order
                  datetime(2018, 1, 4, 10, 0, 4),
              ],
              VALUE_COL: [1, 2, 3, 4],
          }
      )
  
      timeseries_transform = BuildTimeseriesFeaturesTransformer(
          time_col="time"
      )
  
      with pytest.raises(
          NotFittedError, match="This instance is not fitted yet"
      ):
          timeseries_transform.transform(df)
  
      result = timeseries_transform.fit_transform(df)
      assert result["year"].equals(pd.Series([2018, 2018, 2018, 2018]))
      assert result["month"].equals(pd.Series([1, 1, 1, 1]))
      assert result["dom"].equals(pd.Series([1, 2, 3, 4]))
      assert result["hour"].equals(pd.Series([1, 2, 4, 10]))
  
file_path: greykite/greykite/tests/sklearn/transform/test_build_timeseries_features_transformer.py
imports: from datetime import datetime
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from greykite.common.constants import VALUE_COL
  from greykite.common.features.timeseries_features import build_time_features_df
  from greykite.sklearn.transform.build_timeseries_features_transformer import BuildTimeseriesFeaturesTransformer
label_desc: Use image node_id 2 for calling a global function with example usage: test_BuildTimeseriesFeaturesTransformer_2() without return types