code: def test_null_model(X):
      """Checks null model"""
      model = BaseSilverkiteEstimator(
          null_model_params={
              "strategy": "quantile",
              "constant": None,
              "quantile": 0.8,
          }
      )
  
      model.fit(X)
      y = np.repeat(2.0, X.shape[0])
      null_score = model.null_model.score(X, y=y)
      assert null_score == mean_squared_error(
          y, np.repeat(9.0, X.shape[0])
      )
  
      # tests if different score function gets propagated to null model
      model = BaseSilverkiteEstimator(
          score_func=mean_absolute_error,
          null_model_params={
              "strategy": "quantile",
              "constant": None,
              "quantile": 0.8,
          },
      )
      model.fit(X)
      y = np.repeat(2.0, X.shape[0])
      null_score = model.null_model.score(X, y=y)
      assert null_score == mean_absolute_error(
          y, np.repeat(9.0, X.shape[0])
      )
      # checks that `df` is set
      assert_equal(X, model.df)
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from testfixtures import LogCapture
  import greykite.common.constants
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.common.data_loader import DataLoader
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import daily_data_reg
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.sklearn.estimator.base_silverkite_estimator import BaseSilverkiteEstimator
  from greykite.sklearn.estimator.testing_utils import params_component_breakdowns
  from greykite.sklearn.estimator.testing_utils import params_components
label_desc: Use image node_id 9 for calling a global function with example usage: test_null_model(X) without return types