code: def create_holiday_regressors(times, holidays):
      """Creates a design matrix of holiday regressors for a given time series.
  
      Args:
        times: a Pandas `DatetimeIndex` that indexes time series data.
        holidays: a Pandas `DataFrame` containing the dates of holidays. The
          `DataFrame` should have the following columns:
          * `geo`: `str`, two-letter upper-case country code
          * `holiday`: `str`, the name of the holiday
          * `date`: `str`, dates in the form of `YYYY-MM-DD`
  
      Returns:
        holiday_regressors: a Pandas `DataFrame` where the columns are the names of
          holidays. This matrix of one hot encodings is shape
          (N, H), where N is the length of `times` and H is the number of unique
          holiday names in `holidays.holiday`.
      """
      # pylint: disable=g-import-not-at-top
      import pandas as pd
  
      # pylint: enable=g-import-not-at-top
  
      # TODO(b/195346554): Expand fixed holidays.
      _check_times(times)
      _check_holidays(holidays)
  
      holidays = holidays.sort_values("date")
  
      holiday_types = list(holidays.holiday.unique())
      holiday_regressors = pd.DataFrame()
      for holiday in holiday_types:
          holiday_dates = holidays.loc[holidays.holiday == holiday]
          holiday_dates = pd.to_datetime(
              list(holiday_dates.date),
              errors="raise",
              format="%Y-%m-%d",
          )
          holiday_regressors.loc[:, holiday] = _match_dates(
              times, holiday_dates
          )
  
      # Remove all regressors with only zeros.
      holiday_regressors = holiday_regressors.loc[
          :, (holiday_regressors != 0).any(axis=0)
      ]
      return holiday_regressors
  
label_desc: Use image node_id 2 for calling a global function with example usage: create_holiday_regressors(times, holidays) and returns: holiday_regressors