code: def test_prophet_reg_seas_setup(params_reg, X_reg):
      """Checks if parameters are passed to Prophet correctly"""
      coverage = 0.99
      model = ProphetEstimator(
          score_func=mean_squared_error,
          coverage=coverage,
          null_model_params=None,
          **params_reg,
      )
      model.fit(X_reg)
  
      # remove custom seasonalities and regressors before passing params to prophet
      params_no_reg_no_custom_seas = {
          key: value
          for (key, value) in params_reg.items()
          if key not in ["add_regressor_dict", "add_seasonality_dict"]
      }
  
      direct_model = prophet.Prophet(**params_no_reg_no_custom_seas)
  
      # add regressors in direct (prophet) model in the usual way (add_regressor method)
      for reg_col, reg_params in params_reg[
          "add_regressor_dict"
      ].items():
          direct_model.add_regressor(name=reg_col, **reg_params)
  
      # add custom seasonality in direct (prophet) model in the usual way (add_seasonality method)
      for seasonality_type, seasonality_params in params_reg[
          "add_seasonality_dict"
      ].items():
          direct_model.add_seasonality(
              name=seasonality_type, **seasonality_params
          )
  
      # fit direct_model to add weekly seasonality to the seasonalities attribute (only those passed
      # by add_seasonality are set during init)
      df = X_reg
      df.rename(columns={TIME_COL: "ds", VALUE_COL: "y"}, inplace=True)
      # Prophet requires "ds" and "y" as time and value columns respectively.
      direct_model.fit(df)
  
      # direct model regressor and seasonality params
      direct_model_reg = direct_model.extra_regressors
      direct_model_seasonalities = direct_model.seasonalities
  
      # ProphetEstimator model regressor and seasonality params
      model_reg = model.model.extra_regressors
      model_seasonalities = model.model.seasonalities
  
      # confirm if all regressors and their params are being passed accurately, including default params
      for reg_col in params_reg["add_regressor_dict"].keys():
          assert (
              model_reg[reg_col]["mode"]
              == direct_model_reg[reg_col]["mode"]
          )
          assert (
              model_reg[reg_col]["standardize"]
              == direct_model_reg[reg_col]["standardize"]
          )
          assert (
              model_reg[reg_col]["prior_scale"]
              == direct_model_reg[reg_col]["prior_scale"]
          )
  
      # make sure seasonalities are matching
      assert direct_model_seasonalities == model_seasonalities
  
imports: import sys
  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
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import PREDICTED_LOWER_COL
  from greykite.common.constants import PREDICTED_UPPER_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.evaluation import calc_pred_err
  from greykite.common.python_utils import assert_equal
  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.prophet_estimator import ProphetEstimator
label_desc: Use image node_id 10 for calling a global function with example usage: test_prophet_reg_seas_setup(params_reg, X_reg) without return types