code: def im_detect_bbox_aspect_ratio(
      model, im, aspect_ratio, box_proposals=None, hflip=False
  ):
      """Computes bbox detections at the given width-relative aspect ratio.
      Returns predictions in the original image space.
      """
      # Compute predictions on the transformed image
      im_ar = image_utils.aspect_ratio_rel(im, aspect_ratio)
  
      if not cfg.MODEL.FASTER_RCNN:
          box_proposals_ar = box_utils.aspect_ratio(
              box_proposals, aspect_ratio
          )
      else:
          box_proposals_ar = None
  
      if hflip:
          scores_ar, boxes_ar, _ = im_detect_bbox_hflip(
              model,
              im_ar,
              cfg.TEST.SCALE,
              cfg.TEST.MAX_SIZE,
              box_proposals=box_proposals_ar,
          )
      else:
          scores_ar, boxes_ar, _ = im_detect_bbox(
              model,
              im_ar,
              cfg.TEST.SCALE,
              cfg.TEST.MAX_SIZE,
              boxes=box_proposals_ar,
          )
  
      # Invert the detected boxes
      boxes_inv = box_utils.aspect_ratio(boxes_ar, 1.0 / aspect_ratio)
  
      return scores_ar, boxes_inv
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import defaultdict
  import cv2
  import logging
  import numpy
  from caffe2.python import core
  from caffe2.python import workspace
  import pycocotools.mask
  from detectron.core.config import cfg
  from detectron.utils.timer import Timer
  import detectron.core.test_retinanet
  import detectron.modeling.FPN
  import detectron.utils.blob
  import detectron.utils.boxes
  import detectron.utils.image
  import detectron.utils.keypoints
label_desc: Use image node_id 7 for calling a global function with example usage: im_detect_bbox_aspect_ratio(model, im, aspect_ratio, box_proposals, hflip) and returns: scores_ar,  boxes_inv