code: def process_image(sample):
      img_path = sample[0]
  
      img = Image.open(img_path)
      if img.size[0] != img.size[1] or img.size[0] != DATA_DIM:
          img = resize_short(img, target_size=256)
          img = crop_image(img, target_size=DATA_DIM, center=True)
  
      if img.mode != "RGB":
          img = img.convert("RGB")
  
      img = old_div(
          np.array(img).astype("float32").transpose((2, 0, 1)), 255
      )
      img -= img_mean
      img /= img_std
      return [img], img_path
  
file_path: AdvBox/example/reader.py
imports: from __future__ import division
  from past.utils import old_div
  import os
  import random
  import functools
  import numpy
  import paddle
  from PIL import Image, ImageEnhance
label_desc: Use image node_id 3 for calling a global function with example usage: process_image(sample) and returns: list,  img_path