'Iterate over all periods within this event frame'

def __iter__(self):

    periods = self.periods
    rule = self.rule
    if rule:
        for dt in rule:
            if (dt >= self.end):
                break
            if (dt in periods):
                (yield periods[dt])
            else:
                end = rule.after(dt)
                if (not end):
                    end = self.end
                (yield S3TimeSeriesPeriod(dt, end=end))
    else:
        raise NotImplementedError
    return
