code: def convert_pred_to_xywh(pred: Optional[List]):
      if not pred:
          return pred
      for i, pred_per_image in enumerate(pred):
          pred[i]["bboxes"] = bbox_xyxy_to_xywh(
              pred_per_image["bboxes"].detach().numpy()
          )
      return pred
  
imports: import json
  import logging
  import os
  import warnings
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Union
  import defusedxml.ElementTree
  import numpy
  import pandas
  import PIL
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  from ..constants import BBOX, LABEL, MAP, MAP_50, MAP_75, MAP_LARGE, MAP_MEDIUM, MAP_SMALL, MAR_1, MAR_10, MAR_100, MAR_LARGE, MAR_MEDIUM, MAR_SMALL, MEAN_AVERAGE_PRECISION
  from .download import download, is_url
label_desc: Use image node_id 38 for calling a global function with example usage: convert_pred_to_xywh(pred) and returns: pred, pred