code: def tokenize(seq, vocab, neutral_vocab=[]):
      
      # Req: all vocabs have the same length
      if isinstance(neutral_vocab, str):
          neutral_vocab = [neutral_vocab]
  
      nchar = len(vocab[0])
      for l in vocab + neutral_vocab:
          assert len(l) == nchar
      assert len(seq) % nchar == 0  # since we are using striding
  
      vocab_dict = _get_vocab_dict(vocab)
      for l in neutral_vocab:
          vocab_dict[l] = -1
  
      # current performance bottleneck
      return [vocab_dict[seq[(i * nchar):((i + 1) * nchar)]] for i in range(len(seq) // nchar)]
docs: Convert sequence to integers
  
      # Arguments
         seq: Sequence to encode
         vocab: Vocabulary to use
         neutral_vocab: Neutral vocabulary -> assign those values to -1
  
      # Returns
         List of length `len(seq)` with integers from `-1` to `len(vocab) - 1`