code: def assert_forecast_pipeline_result_equal(
      actual, expected, is_silverkite=True, rel=1e-5
  ):
      """Raises an AssertionError if the two forecast pipeline results are not equal"""
      if is_silverkite:
          # checks training matrix, predictors, evaluation splits,
          # and fit parameters
          keys_to_check = {
              "time_col",
              "value_col",
              "origin_for_time_vars",
              "daily_event_df_dict",
              "changepoint_values",
              "continuous_time_col",
              # "growth_func",  # skip, hard to check function equality
              # "fs_func",
              # "autoreg_func",
              "max_lag_order",
              "uncertainty_dict",
              "pred_cols",
              "last_date_for_fit",
              "x_mat",  # training matrix
          }
          simple_model_dict = actual.model.steps[-1][-1].model_dict
          model_dict = expected.model.steps[-1][-1].model_dict
          assert_equal(
              {
                  k: v
                  for k, v in simple_model_dict.items()
                  if k in keys_to_check
              },
              {
                  k: v
                  for k, v in model_dict.items()
                  if k in keys_to_check
              },
              ignore_list_order=True,
          )
          simple_fit_algorithm_dict = actual.model.steps[-1][
              -1
          ].fit_algorithm_dict
          fit_algorithm_dict = expected.model.steps[-1][
              -1
          ].fit_algorithm_dict
          assert simple_fit_algorithm_dict == fit_algorithm_dict
  
      # checks evaluation result on backtest and forecast,
      # including prediction interval and null model metrics
      if actual.backtest is None:
          assert expected.backtest is None
      else:
          assert_equal(
              actual.backtest.train_evaluation,
              expected.backtest.train_evaluation,
              rel=rel,
          )
          assert_equal(
              actual.backtest.test_evaluation,
              expected.backtest.test_evaluation,
              rel=rel,
          )
      assert_equal(
          actual.forecast.train_evaluation,
          expected.forecast.train_evaluation,
          rel=rel,
      )
      assert_equal(
          actual.forecast.test_evaluation,
          expected.forecast.test_evaluation,
          rel=rel,
      )
      assert_equal(
          actual.grid_search.best_index_,
          expected.grid_search.best_index_,
          rel=rel,
      )
      # checks CV search parameters
      assert_equal(
          actual.grid_search.cv.__dict__,
          expected.grid_search.cv.__dict__,
      )
  
imports: import warnings
  from functools import partial
  from typing import Optional
  import numpy
  import pandas
  from sklearn.model_selection import RandomizedSearchCV
  from sklearn.pipeline import Pipeline
  from greykite.common.constants import ACTUAL_COL
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import PREDICTION_BAND_COVERAGE
  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 fraction_outside_tolerance
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import assert_eval_function_equal
  from greykite.framework.constants import FRACTION_OUTSIDE_TOLERANCE_NAME
  from greykite.framework.output.univariate_forecast import UnivariateForecast
  from greykite.framework.pipeline.pipeline import validate_pipeline_input
  from greykite.framework.pipeline.utils import get_score_func_with_aggregation
  from greykite.framework.utils.result_summary import summarize_grid_search_results
  from greykite.sklearn.estimator.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.sklearn_scorer import _PredictScorerDF
label_desc: Use image node_id 6 for calling a global function with example usage: assert_forecast_pipeline_result_equal(actual, expected, is_silverkite, rel) without return types