code: def test_forecast_result_prophet(df):
      forecaster = Forecaster()
      # Run the forecast
      result = forecaster.run_forecast_config(
          df=df,  # includes the regressor
          config=ForecastConfig(
              model_template=ModelTemplateEnum.PROPHET.name,
              forecast_horizon=7,
              coverage=0.8,
              metadata_param=MetadataParam(
                  time_col="ts", value_col="y", freq="D"
              ),
              evaluation_period_param=EvaluationPeriodParam(
                  cv_max_splits=1,
                  cv_horizon=7,
                  test_horizon=7,
                  cv_min_train_periods=80,
              ),
              computation_param=ComputationParam(n_jobs=-1),
          ),
      )
      dump_obj(
          result,
          dir_name="prophet",
          dump_design_info=True,
          overwrite_exist_dir=True,
      )
      result_rec = load_obj(dir_name="prophet", load_design_info=True)
      recursive_rm_dir("prophet")
  
      # Tests loaded results
  
      # Grid search cv results
      # There is one element that can not be tested directly.
      # This element is a pandas.BlockManager object.
      # We compare it separately.
  
      # Only one entry is different.
      assert (
          summarize_grid_search_results(result.grid_search).values
          != summarize_grid_search_results(
              result_rec.grid_search
          ).values
      ).sum().sum() == 1
      # The entry is location 77.
      assert (
          summarize_grid_search_results(result.grid_search).iloc[0, 77]
          != summarize_grid_search_results(result_rec.grid_search).iloc[
              0, 77
          ]
      )
      # Use .equal to test equality, they are actually equal.
      assert (
          summarize_grid_search_results(result.grid_search)
          .iloc[0, 77]
          .equals(
              summarize_grid_search_results(
                  result_rec.grid_search
              ).iloc[0, 77]
          )
      )
  
      # Grid search attributes
      for key in result.grid_search.__dict__.keys():
          if key not in [
              "scoring",
              "estimator",
              "refit",
              "cv",
              "error_score",
              "cv_results_",
              "scorer_",
              "best_estimator_",
          ]:
              assert_equal(
                  result.grid_search.__dict__[key],
                  result_rec.grid_search.__dict__[key],
              )
  
      # Model
      for key in result.model[-1].__dict__.keys():
          if key not in ["score_func", "model"]:
              assert_equal(
                  result.model[-1].__dict__[key],
                  result_rec.model[-1].__dict__[key],
              )
      assert_equal(
          inspect.getsource(result.model[-1].__dict__["score_func"]),
          inspect.getsource(
              result_rec.model[-1].__dict__["score_func"]
          ),
      )
  
      # Forecast
      for key in result.forecast.__dict__.keys():
          if key not in ["r2_loss_function", "estimator"]:
              assert_equal(
                  result.forecast.__dict__[key],
                  result_rec.forecast.__dict__[key],
              )
      assert_equal(
          inspect.getsource(
              result.forecast.__dict__["r2_loss_function"]
          ),
          inspect.getsource(
              result_rec.forecast.__dict__["r2_loss_function"]
          ),
      )
      # Forecast: estimator
      for key in result.forecast.estimator.__dict__.keys():
          if key not in [
              "score_func",
              "silverkite",
              "silverkite_diagnostics",
              "model",
          ]:
              assert_equal(
                  result.forecast.estimator.__dict__[key],
                  result_rec.forecast.estimator.__dict__[key],
              )
      assert_equal(
          inspect.getsource(
              result.forecast.estimator.__dict__["score_func"]
          ),
          inspect.getsource(
              result_rec.forecast.estimator.__dict__["score_func"]
          ),
      )
  
      # Backtest
      for key in result.backtest.__dict__.keys():
          if key not in ["r2_loss_function", "estimator"]:
              assert_equal(
                  result.backtest.__dict__[key],
                  result_rec.backtest.__dict__[key],
              )
      assert_equal(
          inspect.getsource(
              result.backtest.__dict__["r2_loss_function"]
          ),
          inspect.getsource(
              result_rec.backtest.__dict__["r2_loss_function"]
          ),
      )
      # Backtest: estimator
      for key in result.backtest.estimator.__dict__.keys():
          if key not in [
              "score_func",
              "silverkite",
              "silverkite_diagnostics",
              "model",
          ]:
              assert_equal(
                  result.backtest.estimator.__dict__[key],
                  result_rec.backtest.estimator.__dict__[key],
              )
      assert_equal(
          inspect.getsource(
              result.backtest.estimator.__dict__["score_func"]
          ),
          inspect.getsource(
              result_rec.backtest.estimator.__dict__["score_func"]
          ),
      )
  
      # Test the predict methods.
      # We only test the forecasted values, because the prediction intervals are
      # randomly sampled and could be different.
      # We test the prediction after everything because it may alter the class attributes.
      assert_equal(
          result.model[-1].predict(df)["forecast"],
          result_rec.model[-1].predict(df)["forecast"],
      )
      assert_equal(
          result.forecast.estimator.predict(df)["forecast"],
          result_rec.forecast.estimator.predict(df)["forecast"],
      )
      assert_equal(
          result.backtest.estimator.predict(df)["forecast"],
          result_rec.backtest.estimator.predict(df)["forecast"],
      )
  
imports: import inspect
  import os
  import sys
  from collections import OrderedDict
  import pytest
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.framework.templates.autogen.forecast_config import ComputationParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.templates.pickle_utils import dump_obj
  from greykite.framework.templates.pickle_utils import load_obj
  from greykite.framework.templates.pickle_utils import recursive_rm_dir
  from greykite.framework.utils.result_summary import summarize_grid_search_results
label_desc: Use image node_id 10 for calling a global function with example usage: test_forecast_result_prophet(df) without return types