<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split_sequence(seq, n):
 """Generates tokens of length n from a sequence. The last token may be of smaller length."""

    tokens = []
    while seq:
        tokens.append(seq[:n])
        seq = seq[n:]
    return tokens