code: def preprocess(img):
      img = np.array(img).astype(np.float32)
      img = np.rollaxis(img, 2, 0)
      img = np.expand_dims(img, axis=0)
      return img
  
file_path: singa/examples/onnx/tiny_yolov2.py
imports: import os
  import numpy
  from PIL import Image, ImageDraw
  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