code: def test_fit_predict():
      """Tests training mean estimator"""
      model = DummyEstimator()
      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(3.0, X.shape[0]),
          }
      )
  
      assert predicted.equals(expected)
  
      # with np.nan value
      model = DummyEstimator()
      X = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  "2018-01-01", periods=4, freq="1D"
              ),
              VALUE_COL: [2, 3, np.nan, 4],
          }
      )
  
      model.fit(X)
      predicted = model.predict(X)
  
      expected = pd.DataFrame(
          {
              TIME_COL: X[TIME_COL],
              PREDICTED_COL: np.repeat(3.0, 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 2 for calling a global function with example usage: test_fit_predict() without return types