def METHOD_NAME(cls, transitions):
    result = []
    current_frame = None
    last = 0
    for t, value in transitions:
        if t - last > 3:
            if current_frame:
                result.append(current_frame)
            current_frame = cls()
        if current_frame is not None:
            current_frame.push(t, value)
        last = t
    return result