code: def test_plot_components(expected_component_names):
      """Tests "plot_components".
      Because component plots are implemented in `base_silverkite_estimator.py,` the bulk of
      the testing is done there. This file only tests inheritance and compatibility of the
      trained_model generated by this estimator's fit.
      """
      daily_data = generate_df_with_reg_for_tests(
          freq="D",
          periods=20,
          train_start_date=datetime.datetime(2018, 1, 1),
          conti_year_origin=2018,
      )
      train_df = daily_data.get("train_df").copy()
      params_daily = params_components()
      fit_algorithm = params_daily.pop("fit_algorithm", "linear")
      fit_algorithm_params = params_daily.pop(
          "fit_algorithm_params", None
      )
      params_daily["fit_algorithm_dict"] = {
          "fit_algorithm": fit_algorithm,
          "fit_algorithm_params": fit_algorithm_params,
      }
      # removing daily seasonality terms
      params_daily["fs_components_df"] = pd.DataFrame(
          {
              "name": ["tow", "ct1"],
              "period": [7.0, 1.0],
              "order": [4, 5],
              "seas_names": ["weekly", "yearly"],
          }
      )
      model = SilverkiteEstimator(**params_daily)
      with pytest.warns(Warning):
          # suppresses sklearn warning on `iid` parameter for ridge hyperparameter_grid search
          model.fit(train_df)
  
      # Test "plot_components"
      title = "Custom component plot"
      fig = model.plot_components(title=title)
      expected_rows = 10
      assert len(fig.data) == expected_rows  # includes changepoints
      assert all(
          [
              fig.data[i].name in expected_component_names
              for i in range(expected_rows)
          ]
      )
      assert fig.layout.xaxis.title["text"] == "Date"
      assert fig.layout.title["text"] == title
      assert fig.layout.title["x"] == 0.5
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from sklearn.linear_model import SGDRegressor
  from sklearn.metrics import mean_squared_error
  import greykite.common.constants
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  from greykite.common.features.timeseries_impute import impute_with_lags
  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.silverkite_estimator import SilverkiteEstimator
  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 13 for calling a global function with example usage: test_plot_components(expected_component_names) without return types