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()
      model = SimpleSilverkiteEstimator(
          fit_algorithm_dict={"fit_algorithm": "linear"},
          yearly_seasonality=True,
          quarterly_seasonality=False,
          monthly_seasonality=False,
          weekly_seasonality=True,
          daily_seasonality=False,
      )
      model.fit(train_df)
  
      # Tests "plot_components"
      title = "Custom component plot"
      fig = model.plot_components(title=title)
      expected_rows = 9
      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_simple_silverkite import SimpleSilverkiteForecast
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  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.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.estimator.testing_utils import params_component_breakdowns
label_desc: Use image node_id 14 for calling a global function with example usage: test_plot_components(expected_component_names) without return types