code: def postprocess_bbox(
      img_size: ImgSize,
      bbox: BBox,
      transforms: List[Any],
      h_after: int,
      w_after: int,
  ) -> Tuple[int, int, int, int]:
      """
      Post-process predicted bbox to adjust coordinates to input image size.
  
      Parameters
      ----------
      img_size: original image size, before any model-pre-processing done
      bbox: predicted bbox
      transforms: list of model-pre-processing transforms
      h_after: height of image after model-pre-processing transforms
      w_after: width of image after model-pre-processing transforms
  
      Returns
      -------
      Tuple with (xmin, ymin, xmax, ymax) rescaled and re-adjusted to match the original image size
      """
      h_after, w_after = get_size_without_padding(
          transforms, img_size, h_after, w_after
      )
      pad = np.abs(h_after - w_after) // 2
  
      h_scale, w_scale = (
          h_after / img_size.height,
          w_after / img_size.width,
      )
      if h_after < w_after:
          xmin, xmax, ymin, ymax = (
              int(bbox.xmin),
              int(bbox.xmax),
              int(bbox.ymin) - pad,
              int(bbox.ymax) - pad,
          )
      else:
          xmin, xmax, ymin, ymax = (
              int(bbox.xmin) - pad,
              int(bbox.xmax) - pad,
              int(bbox.ymin),
              int(bbox.ymax),
          )
  
      xmin, xmax, ymin, ymax = (
          max(xmin, 0),
          min(xmax, w_after),
          max(ymin, 0),
          min(ymax, h_after),
      )
      xmin, xmax, ymin, ymax = (
          int(xmin / w_scale),
          int(xmax / w_scale),
          int(ymin / h_scale),
          int(ymax / h_scale),
      )
  
      return xmin, ymin, xmax, ymax
  
file_path: icevision/icevision/models/inference.py
imports: from icevision.imports import *
  from icevision.core import *
  from icevision.data import *
  from icevision.tfms.albumentations.albumentations_helpers import get_size_without_padding
  from icevision.tfms.albumentations import albumentations_adapter
  from icevision.utils.imageio import *
  from icevision.visualize.draw_data import *
  from icevision.visualize.utils import *
  from icevision.utils.imageio import get_img_size_from_data
label_desc: Use image node_id 3 for calling a global function with example usage: postprocess_bbox(img_size, bbox, transforms, h_after, w_after) and returns: xmin,  ymin,  xmax,  ymax