code: def test_plot_forecasts_by_config(valid_bm):
      bm = valid_bm
  
      # default value
      fig = bm.plot_forecasts_by_config(config_name="valid_prophet")
      assert fig.layout.showlegend
      assert fig.layout.xaxis.title.text == TIME_COL
      assert fig.layout.yaxis.title.text == VALUE_COL
      assert (
          fig.layout.title.text == "Rolling forecast for valid_prophet"
      )
      assert fig.layout.title.x == 0.5
      assert (
          len(fig.data) == 1 + bm.tscv.max_splits
      )  # len(fig.data) = 1 + number of splits
  
      assert fig.data[0].name == ACTUAL_COL
      assert fig.data[0].line.color == DEFAULT_PLOTLY_COLORS[0]
      for i in np.arange(bm.tscv.max_splits):
          assert fig.data[(i + 1)].name == f"{i}_split"
          assert (
              fig.data[(i + 1)].line.color
              == DEFAULT_PLOTLY_COLORS[(i + 1)]
          )
  
      # custom values
      default_color = "rgb(0, 145, 202)"  # blue
      fig = bm.plot_forecasts_by_config(
          config_name="valid_silverkite",
          colors=[default_color],
          xlabel="xlab",
          ylabel="ylab",
          title="title",
          showlegend=False,
      )
      assert not fig.layout.showlegend
      assert fig.layout.xaxis.title.text == "xlab"
      assert fig.layout.yaxis.title.text == "ylab"
      assert fig.layout.title.text == "title"
      assert fig.layout.title.x == 0.5
  
      assert fig.data[0].name == ACTUAL_COL
      assert fig.data[0].line.color == default_color
      for i in np.arange(bm.tscv.max_splits):
          assert fig.data[(i + 1)].name == f"{i}_split"
          assert fig.data[(i + 1)].line.color == default_color
  
      # Error due to wrong config name
      missing_config_name = {"missing_config"}
      with pytest.raises(
          ValueError,
          match=f"The following config keys are missing: {missing_config_name}",
      ):
          bm.plot_forecasts_by_config(config_name="missing_config")
  
imports: import pickle
  import sys
  import numpy
  import pandas
  import pytest
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.common.constants import ACTUAL_COL
  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 root_mean_squared_error
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.benchmark.benchmark_class import BenchmarkForecastConfig
  from greykite.framework.constants import FORECAST_STEP_COL
  from greykite.framework.templates.autogen.forecast_config import ComputationParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationMetricParam
  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.sklearn.cross_validation import RollingTimeSeriesSplit
label_desc: Use image node_id 11 for calling a global function with example usage: test_plot_forecasts_by_config(valid_bm) without return types