code: def resize_image_type2(self, img):
      h, w, _ = img.shape
  
      resize_w = w
      resize_h = h
  
      # Fix the longer side
      if resize_h > resize_w:
          ratio = float(self.resize_long) / resize_h
      else:
          ratio = float(self.resize_long) / resize_w
  
      resize_h = int(resize_h * ratio)
      resize_w = int(resize_w * ratio)
  
      max_stride = 128
      resize_h = (resize_h + max_stride - 1) // max_stride * max_stride
      resize_w = (resize_w + max_stride - 1) // max_stride * max_stride
      img = cv2.resize(img, (int(resize_w), int(resize_h)))
      ratio_h = resize_h / float(h)
      ratio_w = resize_w / float(w)
  
      return img, [ratio_h, ratio_w]
  
imports: import cv2
  import copy
  import numpy
  import math
  import re
  import sys
  import argparse
  import string
  from copy import deepcopy
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  import yaml
label_desc: Use image node_id 5 for calling the DetResizeForTest obj's underlying member method code with example usage: obj.resize_image_type2(img) and returns: img,  list