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: AdvBox/tutorials/imagenet_tutorial_localsearchattack.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from past.utils import old_div
  import sys
  import logging
  import os
  import numpy
  import math
  import time
  import paddle.fluid
  from PIL import Image
  from adversarialbox.adversary import Adversary
  from adversarialbox.attacks.localsearch import LocalSearchAttack
  from image_classification.alexnet import AlexNet
  from adversarialbox.models.paddleBlackBox import PaddleBlackBoxModel
label_desc: Use image node_id 1 for calling a global function with example usage: resize_short(img, target_size) and returns: img