code: def resize_image(img, min_side=800, max_side=1333):
      """Resize an image such that the size is constrained to min_side and max_side.
  
      Args
          min_side: The image's min side will be equal to min_side after resizing.
          max_side: If after resizing the image's max side is above max_side, resize until the max side is equal to max_side.
  
      Returns
          A resized image.
      """
      # compute scale to resize the image
      scale = compute_resize_scale(
          img.shape, min_side=min_side, max_side=max_side
      )
  
      # resize the image with the computed scale
      img = cv2.resize(img, None, fx=scale, fy=scale)
  
      return img, scale
  
imports: from __future__ import division
  import numpy
  import cv2
  from PIL import Image
  from .transform import change_transform_origin
label_desc: Use image node_id 6 for calling a global function with example usage: resize_image(img, min_side, max_side) and returns: img,  scale