code: def bbox_resize(bbox, in_size, out_size):
      """Resize bouding boxes according to image resize operation.
  
      Parameters
      ----------
      bbox : numpy.ndarray
          Numpy.ndarray with shape (N, 4+) where N is the number of bounding boxes.
          The second axis represents attributes of the bounding box.
          Specifically, these are :math:`(x_{min}, y_{min}, x_{max}, y_{max})`,
          we allow additional attributes other than coordinates, which stay intact
          during bounding box transformations.
      in_size : tuple
          Tuple of length 2: (width, height) for input.
      out_size : tuple
          Tuple of length 2: (width, height) for output.
  
      Returns
      -------
      numpy.ndarray
          Resized bounding boxes with original shape.
      """
      if not len(in_size) == 2:
          raise ValueError(
              "in_size requires length 2 tuple, given {}".format(
                  len(in_size)
              )
          )
      if not len(out_size) == 2:
          raise ValueError(
              "out_size requires length 2 tuple, given {}".format(
                  len(out_size)
              )
          )
  
      bbox = bbox.copy().astype(float)
      x_scale = out_size[0] / in_size[0]
      y_scale = out_size[1] / in_size[1]
      bbox[:, 1] = y_scale * bbox[:, 1]
      bbox[:, 3] = y_scale * bbox[:, 3]
      bbox[:, 0] = x_scale * bbox[:, 0]
      bbox[:, 2] = x_scale * bbox[:, 2]
      return bbox
  
file_path: mxnet/python/mxnet/gluon/contrib/data/vision/transforms/bbox/utils.py
imports: from __future__ import division
  import random
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: bbox_resize(bbox, in_size, out_size) and returns: bbox