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 __init__(
      self,
      columns: List[str] = Config.columns,
      vocab: Vocabulary = None,
      tokenizer: Tokenizer = None,
      max_seq_len: int = Config.max_seq_len,
      language_column: str = Config.language_column,
      lang2id: Dict[str, int] = Config.lang2id,
      use_language_embeddings: bool = Config.use_language_embeddings,
      has_language_in_data: bool = Config.has_language_in_data,
  ) -> None:
      assert (
          len(columns) <= 2
      ), "More than 2 text fields are not supported."
  
      super().__init__(
          columns=columns,
          vocab=vocab,
          tokenizer=tokenizer,
          max_seq_len=max_seq_len,
      )
      self.language_column = language_column
      self.lang2id = lang2id
      self.use_language_embeddings = use_language_embeddings
      self.has_language_in_data = has_language_in_data
      # unlike BERT, XLM uses the EOS token for both beginning and end of
      # sentence
      self.bos_token = self.vocab.eos_token
      self.default_language = "en"
  
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 2 to create a new XLMTensorizer object from inherited base classes: BERTTensorizerBase with example: obj = XLMTensorizer(columns, vocab, tokenizer, max_seq_len, language_column, lang2id, use_language_embeddings, has_language_in_data)