code: def preprocess(img):
      input_shape = (1, 1, 64, 64)
      img = img.resize((64, 64), Image.ANTIALIAS)
      img_data = np.array(img).astype(np.float32)
      img_data = np.resize(img_data, input_shape)
      return img_data
  
file_path: singa/examples/onnx/fer_emotion.py
imports: import os
  import numpy
  from PIL import Image
  from singa import device
  from singa import tensor
  from singa import sonnx
  import onnx
  from utils import download_model, check_exist_or_download
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: preprocess(img) and returns: img_data