code: def get_image(image_file):
      img = Image.open(image_file)
      if img.mode != "RGB":
          img = img.convert("RGB")
      img = resize_short(img, target_size=256)
      img = crop_image(img, target_size=224, center=True)
      img = old_div(
          np.array(img).astype("float32").transpose((2, 0, 1)), 255
      )
  
      # imagenet数据训练时进行了标准化，强烈建议图像预处理时也进行预处理
      img -= img_mean
      img /= img_std
      # img=img[np.newaxis, :]
      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 3 for calling a global function with example usage: get_image(image_file) and returns: img