code: def encode_token(words, wv, w2i):
      """lambda fn for encoding string seq to int seq
      args:
          wv: word vector lookup dictionary
          w2i: word2index lookup dictionary
      """
      ret = []
      for w in words:
          if w in wv:
              ret.append(w2i[w])
      return ret
  
imports: import re
  import os
  import pickle
  import urllib
  import tarfile
  import numpy
  import pandas
  import nltk
  from nltk.stem import PorterStemmer
  from nltk.tokenize.toktok import ToktokTokenizer
  from gensim.models.keyedvectors import KeyedVectors
  from sklearn.model_selection import train_test_split
  from bs4 import BeautifulSoup
label_desc: Use image node_id 11 for calling a global function with example usage: encode_token(words, wv, w2i) and returns: ret