code: def distance_to_holiday(holiday):
      def distance_to_day(index):
          holiday_date = holiday.dates(
              index - pd.Timedelta(days=MAX_WINDOW),
              index + pd.Timedelta(days=MAX_WINDOW),
          )
          assert (
              len(holiday_date) != 0
          ), f"No closest holiday for the date index {index} found."
          # It sometimes returns two dates if it is exactly half a year after the
          # holiday. In this case, the smaller distance (182 days) is returned.
          return (index - holiday_date[0]).days
  
      return distance_to_day
  
file_path: gluonts/src/gluonts/time_feature/holiday.py
imports: from typing import Callable, List
  import numpy
  import pandas
  from pandas.tseries.holiday import SU, TH, EasterMonday, GoodFriday, Holiday, USColumbusDay, USLaborDay, USMartinLutherKingJr, USMemorialDay, USPresidentsDay, USThanksgivingDay
  from pandas.tseries.offsets import DateOffset, Day, Easter
label_desc: Use image node_id 1 for calling a global function with example usage: distance_to_holiday(holiday) and returns: distance_to_day, unknown