def occurrences_after(self, after=None):
        """
        returns a generator that produces occurrences after the datetime
        ``after``.  Includes all of the persisted Occurrences.
        """
        if after is None:
            after = timezone.now()
        occ_replacer = OccurrenceReplacer(self.occurrence_set.all())
        generator = self._occurrences_after_generator(after)
        trickies = list(self.occurrence_set.filter(original_start__lte=after, start__gte=after).order_by('start'))
        while True:
            try:
                nxt = next(generator)
            except __HOLE__:
                nxt = None
            if (len(trickies) > 0 and (nxt is None or nxt.start > trickies[0].start)):
                yield trickies.pop(0)
            if (nxt is None):
                raise StopIteration
            yield occ_replacer.get_occurrence(nxt)
dataset/ETHPy150Open llazzaro/django-scheduler/schedule/models/events.py/Event.occurrences_after