def get_holidays(self, division=None, year=None):
if division:<EOL><INDENT>holidays = self.data[division]<EOL><DEDENT>else:<EOL><INDENT>holidays = self.data[self.ENGLAND_AND_WALES]<EOL>dates_in_common = six.moves.reduce(<EOL>set.intersection,<EOL>(set(map(lambda holiday: holiday['<STR_LIT:date>'], division_holidays))<EOL>for division, division_holidays in six.iteritems(self.data))<EOL>)<EOL>holidays = filter(lambda holiday: holiday['<STR_LIT:date>'] in dates_in_common, holidays)<EOL><DEDENT>if year:<EOL><INDENT>holidays = filter(lambda holiday: holiday['<STR_LIT:date>'].year == year, holidays)<EOL><DEDENT>return list(holidays)<EOL>
Gets a list of all known bank holidays, optionally filtered by division and/or year
:param division: see division constants; defaults to common holidays
:param year: defaults to all available years
:return: list of dicts with titles, dates, etc