'Union an iterable of pairs of the form (time, calendar)
and an iterable of pairs of the form (time, [dates])
(This is shared logic for computing special opens and special closes.)'

def _special_dates(self, calendars, ad_hoc_dates, start_date, end_date):

    _dates = DatetimeIndex([], tz='UTC').union_many(([holidays_at_time(calendar, start_date, end_date, time_, self.tz) for (time_, calendar) in calendars] + [days_at_time(datetimes, time_, self.tz) for (time_, datetimes) in ad_hoc_dates]))
    return _dates[((_dates >= start_date) & (_dates <= end_date))]
