code: def resize_short(img, target_size):
      percent = float(target_size) / min(img.size[0], img.size[1])
      resized_width = int(round(img.size[0] * percent))
      resized_height = int(round(img.size[1] * percent))
      img = img.resize((resized_width, resized_height), Image.LANCZOS)
      return img
  
file_path: PaddleHub/modules/image/classification/efficientnetb6_imagenet/data_feed.py
imports: import os
  import time
  from collections import OrderedDict
  import numpy
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: resize_short(img, target_size) and returns: img