class_docstr: Tensorizer for Cross-lingual LM tasks. Works for single sentence as well
  as sentence pair.
class_docstr_tok: ["Tensorizer","for","Cross-lingual","LM","tasks",".","Works","for","single","sentence","as","well","as","sentence","pair","."]
code: def from_config(cls, config: Config):
      tokenizer = create_component(
          ComponentType.TOKENIZER, config.tokenizer
      )
      with PathManager.open(config.vocab_file) as file_path:
          vocab = build_fairseq_vocab(
              dictionary_class=MaskedLMDictionary,
              vocab_file=file_path,
              max_vocab=config.max_vocab,
              min_count=config.min_count,
              special_token_replacements={
                  "<unk>": SpecialTokens.UNK,
                  "<pad>": SpecialTokens.PAD,
                  "</s>": SpecialTokens.EOS,
                  "<mask>": SpecialTokens.MASK,
              },
          )
      return cls(
          columns=config.columns,
          vocab=vocab,
          tokenizer=tokenizer,
          max_seq_len=config.max_seq_len,
          language_column=config.language_column,
          lang2id=config.lang2id,
          use_language_embeddings=config.use_language_embeddings,
          has_language_in_data=config.has_language_in_data,
      )
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
  from fairseq.data.legacy.masked_lm_dictionary import MaskedLMDictionary
  from pytext.common.constants import SpecialTokens
  from pytext.config.component import ComponentType, create_component
  from pytext.data.bert_tensorizer import BERTTensorizerBase, BERTTensorizerBaseScriptImpl, build_fairseq_vocab
  from pytext.data.tokenizers import Tokenizer
  from pytext.data.utils import Vocabulary
  from pytext.data.xlm_constants import LANG2ID_15
  from pytext.torchscript.utils import ScriptBatchInput
  from pytext.torchscript.vocab import ScriptVocabulary
  from pytext.utils.file_io import PathManager
  from pytext.utils.lazy import lazy_property
label_desc: Use image node_id 1 for calling the XLMTensorizer obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls