code: def test_constant_model():
      """Tests constant model"""
      constant = 1.0
      model = DummyEstimator(strategy="constant", constant=constant)
  
      X = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  "2018-01-01", periods=3, freq="1D"
              ),
              VALUE_COL: [2, 3, 4],
          }
      )
  
      model.fit(X)
      predicted = model.predict(X)
  
      expected = pd.DataFrame(
          {
              TIME_COL: X[TIME_COL],
              PREDICTED_COL: np.repeat(constant, X.shape[0]),
          }
      )
  
      assert predicted.equals(expected)
  
file_path: greykite/greykite/tests/sklearn/estimator/test_null_model.py
imports: import numpy
  import pandas
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.sklearn.estimator.null_model import DummyEstimator
label_desc: Use image node_id 4 for calling a global function with example usage: test_constant_model() without return types