code: def get_event_pred_cols(
      daily_event_df_dict, daily_event_shifted_effect=None
  ):
      """Generates the names of internal predictor columns from
      the event dictionary passed to
      `~greykite.algo.forecast.silverkite.forecast_silverkite.SilverkiteForecast.forecast`.
      These can be passed via the ``extra_pred_cols`` parameter to model event effects.
  
      .. note::
  
          The returned strings are patsy model formula terms.
          Each provides full set of levels so that prediction works even if a
          level is not found in the training set.
  
          If a level does not appear in the training set, its coefficient may
          be unbounded in the "linear" fit_algorithm. A method with regularization
          avoids this issue (e.g. "ridge", "elastic_net").
  
      Parameters
      ----------
      daily_event_df_dict : `dict` or None, optional, default None
          A dictionary of data frames, each representing events data for the corresponding key.
          See `~greykite.algo.forecast.silverkite.forecast_silverkite.SilverkiteForecast.forecast`.
      daily_event_shifted_effect : `list` [`str`] or None, default None
          Additional neighbor events based on given events.
          For example, passing ["-1D", "7D"] will add extra daily events which are 1 day before
          and 7 days after the given events.
          Offset format is {d}{freq} with any integer plus a frequency string.
          Must be parsable by pandas ``to_offset``.
          The new events' names will be the current events' names with suffix "{offset}_before" or "{offset}_after".
          For example, if we have an event named "US_Christmas Day",
          a "7D" shift will have name "US_Christmas Day_7D_after".
          This is useful when you expect an offset of the current holidays also has impact on the
          time series, or you want to interact the lagged terms with autoregression.
          The interaction can be specified with e.g. ``y_lag7:events_US_Christmas Day_7D_after``.
          If ``daily_event_neighbor_impact`` is also specified, this will be applied after adding neighboring days.
  
      Returns
      -------
      event_pred_cols : `list` [`str`]
          List of patsy model formula terms, one for each
          key of ``daily_event_df_dict``.
      """
      event_pred_cols = []
      if daily_event_df_dict is not None:
          for key in sorted(daily_event_df_dict.keys()):
              # `add_daily_events` creates a column with this name.
              term = f"{cst.EVENT_PREFIX}_{key}"
              # Its values are set to the event df label column. Dates that do not correspond
              # to the event are set to `cst.EVENT_DEFAULT`.
              event_levels = [
                  cst.EVENT_DEFAULT
              ]  # reference level for non-event days
              event_levels += list(
                  daily_event_df_dict[key][
                      cst.EVENT_DF_LABEL_COL
                  ].unique()
              )  # this event's levels
              event_pred_cols += [
                  patsy_categorical_term(term=term, levels=event_levels)
              ]
              # Adds columns for additional neighbor events.
              # Does the above for each additional lagged event.
              if daily_event_shifted_effect is not None:
                  for lag in daily_event_shifted_effect:
                      num, freq = split_offset_str(lag)
                      num = int(num)
                      suffix = (
                          cst.EVENT_SHIFTED_SUFFIX_BEFORE
                          if num < 0
                          else cst.EVENT_SHIFTED_SUFFIX_AFTER
                      )
                      term = f"{cst.EVENT_PREFIX}_{key}_{abs(num)}{freq}{suffix}"
                      event_levels = [cst.EVENT_DEFAULT]
                      levels = list(
                          daily_event_df_dict[key][
                              cst.EVENT_DF_LABEL_COL
                          ].unique()
                      )
                      levels = [
                          f"{level}_{abs(num)}{freq}{suffix}"
                          for level in levels
                      ]
                      event_levels += levels
                      event_pred_cols += [
                          patsy_categorical_term(
                              term=term, levels=event_levels
                          )
                      ]
      return event_pred_cols
  
file_path: greykite/greykite/algo/forecast/silverkite/forecast_simple_silverkite_helper.py
imports: import warnings
  import pandas
  from greykite.common import constants
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.constants import EVENT_INDICATOR
  from greykite.common.features.timeseries_features import add_event_window_multi
  from greykite.common.features.timeseries_features import get_fourier_col_name
  from greykite.common.features.timeseries_features import get_holidays
  from greykite.common.python_utils import split_offset_str
label_desc: Use image node_id 6 for calling a global function with example usage: get_event_pred_cols(daily_event_df_dict, daily_event_shifted_effect) and returns: event_pred_cols