@staticmethod<EOL><INDENT>def merge_class(base, other):<DEDENT>
try:<EOL><INDENT>other = other.rules<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>if not isinstance(other, list):<EOL><INDENT>other = [other]<EOL><DEDENT>other_holidays = {holiday.name: holiday for holiday in other}<EOL>try:<EOL><INDENT>base = base.rules<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>if not isinstance(base, list):<EOL><INDENT>base = [base]<EOL><DEDENT>base_holidays = {holiday.name: holiday for holiday in base}<EOL>other_holidays.update(base_holidays)<EOL>return list(other_holidays.values())<EOL>
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