code: def get_holidays(countries, year_start, year_end):
      """This function extracts a holiday data frame for the period of interest
      [year_start to year_end] for the given countries.
      This is done using the holidays libraries in pypi:holidays-ext
  
      Parameters
      ----------
      countries : `list` [`str`]
          countries for which we need holidays
      year_start : `int`
          first year of interest, inclusive
      year_end : `int`
          last year of interest, inclusive
  
      Returns
      -------
      holiday_df_dict : `dict` [`str`, `pandas.DataFrame`]
          - key: country name
          - value: data frame with holidays for that country
            Each data frame has two columns: EVENT_DF_DATE_COL, EVENT_DF_LABEL_COL
      """
      country_holiday_dict = {}
      year_list = list(range(year_start, year_end + 1))
  
      country_holidays = get_hdays.get_holiday(
          country_list=countries, years=year_list
      )
  
      for country, holidays in country_holidays.items():
          country_df = pd.DataFrame(
              {
                  cst.EVENT_DF_DATE_COL: list(holidays.keys()),
                  cst.EVENT_DF_LABEL_COL: list(holidays.values()),
              }
          )
          # Replaces any occurrence of "/" with ", " in order to avoid saving / loading error in
          # `~greykite.framework.templates.pickle_utils` because a holiday name can be the key
          # of a dictionary that will be used as directory name.
          # For example, "Easter Monday [England/Wales/Northern Ireland]" will be casted to
          # "Easter Monday [England, Wales, Northern Ireland]".
          country_df[cst.EVENT_DF_LABEL_COL] = country_df[
              cst.EVENT_DF_LABEL_COL
          ].str.replace("/", ", ")
          country_df[cst.EVENT_DF_DATE_COL] = pd.to_datetime(
              country_df[cst.EVENT_DF_DATE_COL]
          )
  
          country_holiday_dict[country] = country_df
  
      return country_holiday_dict
  
imports: import math
  from datetime import datetime
  from datetime import timedelta
  import numpy
  import pandas
  import pytz
  from holidays_ext import get_holidays
  from pandas.tseries.frequencies import to_offset
  from scipy.special import expit
  from greykite.common import constants
  from greykite.common.python_utils import split_offset_str
label_desc: Use image node_id 11 for calling a global function with example usage: get_holidays(countries, year_start, year_end) and returns: country_holiday_dict