code: def get_extra_pred_cols(model_components=None):
      """Gets extra predictor columns from the model components for
      :func:`~greykite.framework.templates.silverkite_templates.silverkite_template`.
  
      Parameters
      ----------
      model_components : :class:`~greykite.framework.templates.autogen.forecast_config.ModelComponentsParam` or None, default None
          Configuration of model growth, seasonality, events, etc.
          See :func:`~greykite.framework.templates.silverkite_templates.silverkite_template`
          for details.
  
      Returns
      -------
      extra_pred_cols : `list` [`str`]
          All extra predictor columns used in any hyperparameter set
          requested by ``model_components.custom["extra_pred_cols]``.
          Regressors are included in this list.
          None if there are no extra predictor columns.
      """
      if (
          model_components is not None
          and model_components.custom is not None
      ):
          # ``extra_pred_cols`` is a list of strings to initialize
          # SilverkiteEstimator.extra_pred_cols, or a list of
          # such lists.
          extra_pred_cols = model_components.custom.get(
              "extra_pred_cols", []
          )
      else:
          extra_pred_cols = []
      return unique_in_list(
          array=extra_pred_cols, ignored_elements=(None,)
      )
  
imports: import dataclasses
  import functools
  from typing import Dict
  from typing import Optional
  import numpy
  import pandas
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.common.constants import TimeFeaturesEnum
  from greykite.common.features.timeseries_lags import build_autoreg_df_multi
  from greykite.common.python_utils import dictionaries_values_to_lists
  from greykite.common.python_utils import unique_in_list
  from greykite.common.python_utils import update_dictionaries
  from greykite.common.python_utils import update_dictionary
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.base_template import BaseTemplate
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: get_extra_pred_cols(model_components) and returns: unique_in_list