code: def on_prediction_end(self, predictions):
      # de-duplicate the predictions (duplication is introduced by DistributedSampler)
      prediction_dict = {
          image_id: entries for image_id, entries in predictions
      }
  
      unique_entries = []
      for image_id in sorted(prediction_dict):
          unique_entries.extend(prediction_dict[image_id])
  
      return unique_entries
  
file_path: mmf/mmf/datasets/builders/coco/detection_dataset.py
imports: import os
  from typing import Dict
  import torch
  import torch.nn.functional
  import torchvision
  from mmf.common.sample import Sample
  from mmf.datasets.base_dataset import BaseDataset
  from mmf.utils.distributed import gather_tensor_along_batch, object_to_byte_tensor
  from torch import nn, Tensor
label_desc: Use image node_id 5 for calling the DetectionCOCODataset obj's underlying member method code with example usage: obj.on_prediction_end(predictions) and returns: unique_entries