docs: def _sufficient_gaps(self,
                           startdate: datetime.date,
                           enddate: datetime.date,
                           requiredgaps: List[datetime.timedelta],
                           flexibility: int) -> Tuple[bool, Optional[Interval]]:
          """
          Are there sufficient gaps (specified by ``requiredgaps``) in the date
          range specified? This is a worker function for :meth:`sufficient_gaps`.
          """
          requiredgaps = list(requiredgaps)  # make a copy
          interval = Interval.dayspan(startdate, enddate, include_end=True)
          # log.debug(">>> _sufficient_gaps")
          gaps = self.gap_subset(interval, flexibility)
          gapdurations = gaps.durations()
          gaplist = gaps.list()
          gapdurations.sort(reverse=True)  # longest gap first
          requiredgaps.sort(reverse=True)  # longest gap first
          # log.debug("... gaps = {}".format(gaps))
          # log.debug("... gapdurations = {}".format(gapdurations))
          # log.debug("... requiredgaps = {}".format(requiredgaps))
          while requiredgaps:
              # log.debug("... processing gap")
              if not gapdurations:
                  # log.debug("<<< no gaps left")
                  return False, None
              if gapdurations[0] < requiredgaps[0]:
                  # log.debug("<<< longest gap is too short")
                  return False, self.first_interval_ending(gaplist[0].start)
              gapdurations.pop(0)
              requiredgaps.pop(0)
              gaplist.pop(0)
              # ... keeps gaplist and gapdurations mapped to each other
          # log.debug("<<< success")
          return True, None