code: def convert_raw_predictions(
      batch,
      raw_preds,
      records: Sequence[BaseRecord],
      detection_threshold: float,
      keep_images: bool = False,
  ):
      # In inference, both "img" and "img_metas" are lists. Check out the `build_infer_batch()` definition
      # We need to convert that to a batch similar to train and valid batches
      if isinstance(batch["img"], list):
          batch = {
              "img": batch["img"][0],
              "img_metas": batch["img_metas"][0],
          }
  
      batch_list = [
          dict(zip(batch, t)) for t in zipsafe(*batch.values())
      ]
      return [
          convert_raw_prediction(
              sample=sample,
              raw_pred=raw_pred,
              record=record,
              detection_threshold=detection_threshold,
              keep_image=keep_images,
          )
          for sample, raw_pred, record in zip(
              batch_list, raw_preds, records
          )
      ]
  
file_path: icevision/icevision/models/mmdet/common/mask/prediction.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.data import *
  from icevision.models.utils import _predict_from_dl
  from icevision.models.mmdet.common.utils import *
  from icevision.models.mmdet.common.mask.dataloaders import *
  from icevision.models.mmdet.common.bbox.prediction import _unpack_raw_bboxes
label_desc: Use image node_id 4 for calling a global function with example usage: convert_raw_predictions(batch, raw_preds, records, detection_threshold, keep_images) and returns: unknown