code: def _get_map_input(self, pred_results):
      preds = []
      target = []
  
      batch_size = len(pred_results)
  
      for i in range(batch_size):
          if hasattr(pred_results[i][BBOX], "masks"):
              # has one additional dimension with 2 outputs: img_result=img_result[0], mask_result=img_result[1]
              raise NotImplementedError(
                  "Do not support training for models with masks like mask r-cnn, "
                  "because most custom datasets do not have a ground truth mask."
                  " However, you can still inference with this model."
              )
          preds.append(
              dict(
                  boxes=pred_results[i][
                      BBOX
                  ].bboxes,  # .float().to(self.device)?
                  scores=pred_results[i][
                      BBOX
                  ].scores,  # .float().to(self.device)?
                  labels=pred_results[i][
                      BBOX
                  ].labels,  # .long().to(self.device)?
              )
          )
          target.append(
              dict(
                  boxes=pred_results[i][LABEL].bboxes,
                  labels=pred_results[i][LABEL].labels,
              )
          )
  
      return preds, target
  
imports: import logging
  from typing import Callable, Optional, Union
  import lightning.pytorch
  import torchmetrics
  from lightning.pytorch.utilities import grad_norm
  from torch.nn.modules.loss import _Loss
  from torchmetrics.aggregation import BaseAggregator
  from ..constants import BBOX, IMAGE, LABEL
  from .utils import apply_layerwise_lr_decay, apply_single_lr, apply_two_stages_lr, get_lr_scheduler, get_optimizer, remove_parameters_without_grad
label_desc: Use image node_id 5 for calling the MMDetLitModule obj's underlying member method code with example usage: obj._get_map_input(pred_results) and returns: preds,  target