code: def format_for_prediction(self, batch, answers):
      answers = answers.argmax(dim=1)
  
      predictions = []
      for idx, question_id in enumerate(batch["question_id"]):
          answer_id = answers[idx]
  
          if answer_id >= self.answer_space_size:
              answer_id -= self.answer_space_size
              answer = word_tokenize(
                  batch["ocr_tokens"][answer_id][idx]
              )
          else:
              answer = self.answer_dict.idx2word(answer_id)
          predictions.append(
              {"question_id": question_id.item(), "answer": answer}
          )
  
      return predictions
  
imports: from mmf.datasets.builders.vizwiz import VizWizDataset
  from mmf.utils.text import word_tokenize
label_desc: Use image node_id 2 for calling the VQA2OCRDataset obj's underlying member method code with example usage: obj.format_for_prediction(batch, answers) and returns: predictions