code: def numberize(
      self,
      per_sentence_tokens: List[List[Tuple[str, int, int]]],
      per_sentence_languages: List[int],
  ) -> Tuple[List[int], List[int], int, List[int]]:
      tokens: List[int] = []
      segment_labels: List[int] = []  # e.g language_ids
      seq_len: int = 0
      positions: List[int] = []
      max_seq_len: int = self.max_seq_len // len(per_sentence_tokens)
  
      for idx, single_sentence_tokens in enumerate(per_sentence_tokens):
          lookup_ids: List[int] = self._lookup_tokens(
              single_sentence_tokens, max_seq_len=max_seq_len
          )[0]
          lookup_ids = self._wrap_numberized_tokens(lookup_ids, idx)
  
          tokens.extend(lookup_ids)
          segment_labels.extend(
              [per_sentence_languages[idx]] * len(lookup_ids)
          )
      seq_len = len(tokens)
      positions = [i for i in range(seq_len)]
  
      return tokens, segment_labels, seq_len, positions
  
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 3 for calling the XLMTensorizerScriptImpl obj's underlying member method code with example usage: obj.numberize(per_sentence_tokens, per_sentence_languages) and returns: tokens,  segment_labels,  seq_len,  positions