<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def intervals_ms(self, timeout_ms):
 """Generate a series of interval lengths, in ms, which will add up to the number of ms in timeout_ms. If timeout_ms is None, keep returning intervals forever. """

        if timeout_ms is config.FOREVER:
            while True:
                yield self.try_length_ms
        else:
            whole_intervals, part_interval = divmod(timeout_ms, self.try_length_ms)
            for _ in range(whole_intervals):
                yield self.try_length_ms
            yield part_interval