class_docstr: Produces inputs and answer spans for Squad.
class_docstr_tok: ["Produces","inputs","and","answer","spans","for","Squad","."]
code: def from_config(cls, config: Config, **kwargs):
      tokenizer = create_component(
          ComponentType.TOKENIZER, config.tokenizer
      )
      vocab = None
      if isinstance(tokenizer, WordPieceTokenizer):
          print("Using WordPieceTokenizer")
          replacements = {
              "[UNK]": SpecialTokens.UNK,
              "[PAD]": SpecialTokens.PAD,
              "[CLS]": SpecialTokens.BOS,
              "[SEP]": SpecialTokens.EOS,
              "[MASK]": SpecialTokens.MASK,
          }
          vocab = Vocabulary(
              [token for token, _ in tokenizer.vocab.items()],
              replacements=replacements,
          )
  
      doc_tensorizer = TokenTensorizer(
          text_column=config.doc_column,
          tokenizer=tokenizer,
          vocab=vocab,
          max_seq_len=config.max_doc_seq_len,
      )
      ques_tensorizer = TokenTensorizer(
          text_column=config.ques_column,
          tokenizer=tokenizer,
          vocab=vocab,
          max_seq_len=config.max_ques_seq_len,
      )
      return cls(
          doc_tensorizer=doc_tensorizer,
          ques_tensorizer=ques_tensorizer,
          doc_column=config.doc_column,
          ques_column=config.ques_column,
          answers_column=config.answers_column,
          answer_starts_column=config.answer_starts_column,
          tokenizer=tokenizer,
          vocab=vocab,
          **kwargs,
      )
  
imports: from typing import List
  import torch
  from pytext.common.constants import SpecialTokens
  from pytext.config.component import ComponentType, create_component
  from pytext.data.tensorizers import TokenTensorizer
  from pytext.data.tokenizers import Tokenizer, WordPieceTokenizer
  from pytext.data.utils import pad_and_tensorize, VocabBuilder, Vocabulary
label_desc: Use image node_id 1 for calling the SquadTensorizer obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls