class_docstr: An Implementation of TokenTensorizer that uses a TorchScript module in the
  background and is hence torchscriptifiable.
  
  Note that unlike the original TokenTensorizer, this version cannot deal with
  arbitrarily nested lists of tokens.
code: def __init__(
      self,
      text_column,
      tokenizer=None,
      add_bos_token=Config.add_bos_token,
      add_eos_token=Config.add_eos_token,
      use_eos_token_for_bos=Config.use_eos_token_for_bos,
      max_seq_len=Config.max_seq_len,
      vocab_config=None,
      vocab=None,
      vocab_file_delimiter=" ",
      is_input=Config.is_input,
  ):
      self.text_column = text_column
      self.tokenizer = tokenizer or Tokenizer()
      self.vocab = vocab
      self.add_bos_token = add_bos_token
      self.add_eos_token = add_eos_token
      self.use_eos_token_for_bos = use_eos_token_for_bos
      self.max_seq_len = max_seq_len or 2**30  # large number
      self.vocab_builder = None
      self.vocab_config = vocab_config or VocabConfig()
      self.vocab_file_delimiter = vocab_file_delimiter
      super().__init__(is_input)
  
imports: from typing import List, Optional, Tuple
  import torch
  from pytext.config.component import ComponentType, create_component
  from pytext.data.tensorizers import TensorizerScriptImpl
  from pytext.data.tokenizers import Tokenizer
  from pytext.torchscript.tensorizer.tensorizer import VocabLookup
  from pytext.torchscript.tokenizer import ScriptDoNothingTokenizer
  from pytext.torchscript.utils import ScriptBatchInput
  from pytext.torchscript.vocab import ScriptVocabulary
  from pytext.utils import cuda
  from pytext.utils.file_io import PathManager
  from pytext.utils.lazy import lazy_property
  from pytorch.text.fb.utils.transform_utils import pad_2d
  from .tensorizers import Tensorizer, tokenize, VocabConfig
  from .utils import VocabBuilder, Vocabulary
label_desc: Use image node_id 2 to create a new ScriptBasedTokenTensorizer object from inherited base classes: Tensorizer with example: obj = ScriptBasedTokenTensorizer(text_column, tokenizer, add_bos_token, add_eos_token, use_eos_token_for_bos, max_seq_len, vocab_config, vocab, vocab_file_delimiter, is_input)