class_docstr: Abstract interface to create holidays following certain rules.
class_docstr_tok: ["Abstract","interface","to","create","holidays","following","certain","rules","."]
docstr: Merge holiday calendars together. The base calendar
  will take precedence to other. The merge will be done
  based on each holiday's name.
  
  Parameters
  ----------
  base : AbstractHolidayCalendar
    instance/subclass or array of Holiday objects
  other : AbstractHolidayCalendar
    instance/subclass or array of Holiday objects
docstr_tok: ["Merge","holiday","calendars","together",".","The","base","calendar","will","take","precedence","to","other",".","The","merge","will","be","done","based","on","each","holiday","'s","name",".","Parameters","--","--","--","--","--","base",":","AbstractHolidayCalendar","instance\/subclass","or","array","of","Holiday","objects","other",":","AbstractHolidayCalendar","instance\/subclass","or","array","of","Holiday","objects"]
code: def merge_class(base, other):
      """
      Merge holiday calendars together. The base calendar
      will take precedence to other. The merge will be done
      based on each holiday's name.
  
      Parameters
      ----------
      base : AbstractHolidayCalendar
        instance/subclass or array of Holiday objects
      other : AbstractHolidayCalendar
        instance/subclass or array of Holiday objects
      """
      try:
          other = other.rules
      except AttributeError:
          pass
  
      if not isinstance(other, list):
          other = [other]
      other_holidays = {holiday.name: holiday for holiday in other}
  
      try:
          base = base.rules
      except AttributeError:
          pass
  
      if not isinstance(base, list):
          base = [base]
      base_holidays = {holiday.name: holiday for holiday in base}
  
      other_holidays.update(base_holidays)
      return list(other_holidays.values())
  
imports: from datetime import datetime, timedelta
  import warnings
  from dateutil.relativedelta import FR, MO, SA, SU, TH, TU, WE
  import numpy
  from pandas.compat import add_metaclass
  from pandas.errors import PerformanceWarning
  from pandas import DateOffset, Series, Timestamp, date_range
  from pandas.tseries.offsets import Day, Easter
label_desc: Use image node_id 4 for calling the AbstractHolidayCalendar obj's underlying member method code with example usage: obj.merge_class(base, other) and returns: list