code: def format_for_prediction(self, report):
      answers = report.scores.argmax(dim=1)
  
      predictions = []
      answer_space_size = self.answer_processor.get_true_vocab_size()
  
      for idx, image_id in enumerate(report.image_id):
          answer_id = answers[idx].item()
  
          if answer_id >= answer_space_size:
              answer_id -= answer_space_size
              answer = report.context_tokens[idx][answer_id]
          else:
              answer = self.answer_processor.idx2word(answer_id)
          # if answer == self.context_processor.PAD_TOKEN:
          #     answer = "unanswerable"
          if answer == "<unk>" or answer == "<pad>":
              answer = "unanswerable"
          predictions.append(
              {
                  # "image": "_".join(["VizWiz"] + image_id.split("_")[2:]) + ".jpg",
                  "image": "VizWiz_"
                  + self._dataset_type
                  + "_"
                  + str(image_id.item()).zfill(12)
                  + ".jpg",
                  "answer": answer,
              }
          )
  
      return predictions
  
imports: import torch
  from mmf.common.sample import Sample
  from mmf.datasets.builders.vqa2 import VQA2Dataset
label_desc: Use image node_id 3 for calling the VizWizDataset obj's underlying member method code with example usage: obj.format_for_prediction(report) and returns: predictions