code: def transform(im, pixel_means, pixel_stds, pixel_scale):
      """
      transform into mxnet tensor,
      subtract pixel size and transform to correct format
      :param im: [height, width, channel] in BGR
      :param pixel_means: [B, G, R pixel means]
      :return: [batch, channel, height, width]
      """
      im_tensor = np.zeros((1, 3, im.shape[0], im.shape[1]))
      for i in range(3):
          im_tensor[0, i, :, :] = (
              im[:, :, 2 - i] / pixel_scale - pixel_means[2 - i]
          ) / pixel_stds[2 - i]
      return im_tensor
  
imports: from __future__ import print_function
  import numpy
  import cv2
  import os
  import math
  import sys
  import random
  from ..config import config
label_desc: Use image node_id 13 for calling a global function with example usage: transform(im, pixel_means, pixel_stds, pixel_scale) and returns: im_tensor