code: def _day_rule_matches(self, rule, dt):
          
          if dt.weekday() == 4:
              sat = dt + datetime.timedelta(days=1)
              if super(USFederalHolidays, self)._day_rule_matches(rule, sat):
                  return True
          elif dt.weekday() == 0:
              sun = dt - datetime.timedelta(days=1)
              if super(USFederalHolidays, self)._day_rule_matches(rule, sun):
                  return True
          return super(USFederalHolidays, self)._day_rule_matches(rule, dt)
docs: Day-of-month-specific US federal holidays that fall on Sat or Sun are
          observed on Fri or Mon respectively. Note that this method considers
          both the actual holiday and the day of observance to be holidays.