code: def split_sequence(seq, n):
      
      tokens = []
      while seq:
          tokens.append(seq[:n])
          seq = seq[n:]
      return tokens
docs: Generates tokens of length n from a sequence.
      The last token may be of smaller length.