code: def __call__(
      self, tokens_batch: Union[List[str], List[List[str]]]
  ) -> Tuple[
      List[List[str]],
      List[List[str]],
      np.ndarray,
      np.ndarray,
      np.ndarray,
  ]:
      if isinstance(
          tokens_batch[0], str
      ):  # skip for already tokenized text
          tokens_batch = [
              self.tokenizer.basic_tokenizer.tokenize(
                  sentence, self.tokenizer.all_special_tokens
              )
              for sentence in tokens_batch
          ]
      startofword_markers_batch = []
      subtokens_batch = []
      for tokens in tokens_batch:
          startofword_markers = [0]
          subtokens = ["[CLS]"]
          for token in tokens:
              for i, subtoken in enumerate(
                  self.tokenizer.wordpiece_tokenizer.tokenize(token)
              ):
                  startofword_markers.append(int(i == 0))
                  subtokens.append(subtoken)
          startofword_markers.append(0)
          subtokens.append("[SEP]")
          if len(subtokens) > self.max_seq_length:
              raise RuntimeError(
                  f"input sequence after bert tokenization"
                  f" cannot exceed {self.max_seq_length} tokens."
              )
  
          startofword_markers_batch.append(startofword_markers)
          subtokens_batch.append(subtokens)
  
      encoded = self.tokenizer.batch_encode_plus(
          [[subtokens, None] for subtokens in subtokens_batch],
          add_special_tokens=False,
      )
  
      return (
          tokens_batch,
          subtokens_batch,
          _pad(encoded["input_ids"], value=self.tokenizer.pad_token_id),
          _pad(startofword_markers_batch),
          _pad(encoded["attention_mask"]),
      )
  
file_path: DeepPavlov/deeppavlov/models/preprocessors/transformers_preprocessor.py
imports: from logging import getLogger
  from typing import List, Union, Tuple
  import numpy
  from transformers import BertTokenizer
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 2 for calling the TransformersBertPreprocessor obj's underlying member method code with example usage: obj.__call__(tokens_batch) and returns: tokens_batch,  subtokens_batch,  _pad,  _pad,  _pad