class_docstr: Extension of BertTokenizer which supports multiple sentences.
  Separate from normal usecase, each sentence will be passed through
  bert tokenizer separately and indices will be reshaped as single
  tensor. Segment ids will also be increasing in number.
class_docstr_tok: ["Extension","of","BertTokenizer","which","supports","multiple","sentences",".","Separate","from","normal","usecase",",","each","sentence","will","be","passed","through","bert","tokenizer","separately","and","indices","will","be","reshaped","as","single","tensor",".","Segment","ids","will","also","be","increasing","in","number","."]
code: def __call__(self, item: Dict[str, Any]):
      texts = item["text"]
      if not isinstance(texts, list):
          texts = [texts]
  
      processed = []
      for idx, text in enumerate(texts):
          sample = Sample()
          processed_text = self.tokenizer({"text": text})
          sample.update(processed_text)
          sample.segment_ids.fill_(idx)
          processed.append(sample)
      # Use SampleList to convert list of tensors to stacked tensors
      processed = SampleList(processed)
      if self.fusion_strategy == "concat":
          processed.input_ids = processed.input_ids.view(-1)
          processed.input_mask = processed.input_mask.view(-1)
          processed.segment_ids = processed.segment_ids.view(-1)
          processed.lm_label_ids = processed.lm_label_ids.view(-1)
      return processed.to_dict()
  
imports: import copy
  import random
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from mmf.common.registry import registry
  from mmf.common.sample import Sample, SampleList
  from mmf.datasets.processors.processors import BaseProcessor
label_desc: Use image node_id 2 for calling the MultiSentenceBertTokenizer obj's underlying member method code with example usage: obj.__call__(item) and returns: processed