code: def _add_masked_caption(self, sample_info, current_sample):
      captions = sample_info["captions"]
      image_id = sample_info["image_id"]
      num_captions = len(captions)
      selected_caption_index = random.randint(0, num_captions - 1)
      other_caption_indices = [
          i for i in range(num_captions) if i != selected_caption_index
      ]
      selected_caption = captions[selected_caption_index]
      other_caption = None
      is_correct = -1
  
      if self._two_sentence:
          if random.random() > self._two_sentence_probability:
              other_caption = self._get_mismatching_caption(image_id)
              is_correct = False
          else:
              other_caption = captions[
                  random.choice(other_caption_indices)
              ]
              is_correct = True
      elif self._false_caption:
          if random.random() < self._false_caption_probability:
              selected_caption = self._get_mismatching_caption(image_id)
              is_correct = False
          else:
              is_correct = True
  
      processed = self.masked_token_processor(
          {
              "text_a": selected_caption,
              "text_b": other_caption,
              "is_correct": is_correct,
          }
      )
      processed.pop("tokens")
      current_sample.update(processed)
  
      return current_sample
  
file_path: mmf/mmf/datasets/builders/coco/masked_dataset.py
imports: import random
  from mmf.common.sample import Sample
  from mmf.datasets.builders.coco import COCODataset
label_desc: Use image node_id 3 for calling the MaskedCOCODataset obj's underlying member method code with example usage: obj._add_masked_caption(sample_info, current_sample) and returns: current_sample