class_docstr: Class that defines a holiday with start/end dates and rules
  for observance.
docstr: Parameters
  ----------
  name : str
      Name of the holiday , defaults to class name
  offset : array of pandas.tseries.offsets or
          class from pandas.tseries.offsets
      computes offset from date
  observance: function
      computes when holiday is given a pandas Timestamp
  days_of_week:
      provide a tuple of days e.g  (0,1,2,3,) for Monday Through Thursday
      Monday=0,..,Sunday=6
  
  Examples
  --------
  >>> from dateutil.relativedelta import MO
  
  >>> USMemorialDay = pd.tseries.holiday.Holiday(
  ...     "Memorial Day", month=5, day=31, offset=pd.DateOffset(weekday=MO(-1))
  ... )
  >>> USMemorialDay
  Holiday: Memorial Day (month=5, day=31, offset=<DateOffset: weekday=MO(-1)>)
  
  >>> USLaborDay = pd.tseries.holiday.Holiday(
  ...     "Labor Day", month=9, day=1, offset=pd.DateOffset(weekday=MO(1))
  ... )
  >>> USLaborDay
  Holiday: Labor Day (month=9, day=1, offset=<DateOffset: weekday=MO(+1)>)
  
  >>> July3rd = pd.tseries.holiday.Holiday("July 3rd", month=7, day=3)
  >>> July3rd
  Holiday: July 3rd (month=7, day=3, )
  
  >>> NewYears = pd.tseries.holiday.Holiday(
  ...     "New Years Day", month=1,  day=1,
  ...      observance=pd.tseries.holiday.nearest_workday
  ... )
  >>> NewYears  # doctest: +SKIP
  Holiday: New Years Day (
      month=1, day=1, observance=<function nearest_workday at 0x66545e9bc440>
  )
  
  >>> July3rd = pd.tseries.holiday.Holiday(
  ...     "July 3rd", month=7, day=3,
  ...     days_of_week=(0, 1, 2, 3)
  ... )
  >>> July3rd
  Holiday: July 3rd (month=7, day=3, )
code: def __init__(
      self,
      name: str,
      year=None,
      month=None,
      day=None,
      offset=None,
      observance=None,
      start_date=None,
      end_date=None,
      days_of_week=None,
  ) -> None:
      """
      Parameters
      ----------
      name : str
          Name of the holiday , defaults to class name
      offset : array of pandas.tseries.offsets or
              class from pandas.tseries.offsets
          computes offset from date
      observance: function
          computes when holiday is given a pandas Timestamp
      days_of_week:
          provide a tuple of days e.g  (0,1,2,3,) for Monday Through Thursday
          Monday=0,..,Sunday=6
  
      Examples
      --------
      >>> from dateutil.relativedelta import MO
  
      >>> USMemorialDay = pd.tseries.holiday.Holiday(
      ...     "Memorial Day", month=5, day=31, offset=pd.DateOffset(weekday=MO(-1))
      ... )
      >>> USMemorialDay
      Holiday: Memorial Day (month=5, day=31, offset=<DateOffset: weekday=MO(-1)>)
  
      >>> USLaborDay = pd.tseries.holiday.Holiday(
      ...     "Labor Day", month=9, day=1, offset=pd.DateOffset(weekday=MO(1))
      ... )
      >>> USLaborDay
      Holiday: Labor Day (month=9, day=1, offset=<DateOffset: weekday=MO(+1)>)
  
      >>> July3rd = pd.tseries.holiday.Holiday("July 3rd", month=7, day=3)
      >>> July3rd
      Holiday: July 3rd (month=7, day=3, )
  
      >>> NewYears = pd.tseries.holiday.Holiday(
      ...     "New Years Day", month=1,  day=1,
      ...      observance=pd.tseries.holiday.nearest_workday
      ... )
      >>> NewYears  # doctest: +SKIP
      Holiday: New Years Day (
          month=1, day=1, observance=<function nearest_workday at 0x66545e9bc440>
      )
  
      >>> July3rd = pd.tseries.holiday.Holiday(
      ...     "July 3rd", month=7, day=3,
      ...     days_of_week=(0, 1, 2, 3)
      ... )
      >>> July3rd
      Holiday: July 3rd (month=7, day=3, )
      """
      if offset is not None and observance is not None:
          raise NotImplementedError(
              "Cannot use both offset and observance."
          )
  
      self.name = name
      self.year = year
      self.month = month
      self.day = day
      self.offset = offset
      self.start_date = (
          Timestamp(start_date)
          if start_date is not None
          else start_date
      )
      self.end_date = (
          Timestamp(end_date) if end_date is not None else end_date
      )
      self.observance = observance
      assert days_of_week is None or type(days_of_week) == tuple
      self.days_of_week = days_of_week
  
imports: from __future__ import annotations
  from datetime import datetime, timedelta
  import warnings
  from dateutil.relativedelta import FR, MO, SA, SU, TH, TU, WE
  import numpy
  from pandas.errors import PerformanceWarning
  from pandas import DateOffset, DatetimeIndex, Series, Timestamp, concat, date_range
  from pandas.tseries.offsets import Day, Easter
label_desc: Use image node_id 1 to create a new Holiday object  with example: obj = Holiday(name, year, month, day, offset, observance, start_date, end_date, days_of_week)