code: def Normalize(
      path,
      size=224,
      scale=0.0392156863,
      mean=[-0.485, -0.456, -0.406],
      std=[0.229, 0.224, 0.225],
      BGRTranspose=False,
  ):
      img = Image.open(path)
      img = img.resize((size, size))
      x = np.array(img, dtype=np.float32)
      x *= scale
      for i in range(0, 3):
          x[..., i] += mean[i]
          x[..., i] /= std[i]
      if BGRTranspose == True:
          x = x[..., ::-1]
      return x
  
file_path: MMdnn/mmdnn/conversion/examples/imagenet_test.py
imports: from __future__ import absolute_import
  import argparse
  import numpy
  from six import text_type
  from PIL import Image
label_desc: Use image node_id 3 for calling the TestKit obj's underlying member method code with example usage: obj.Normalize(path, size, scale, mean, std, BGRTranspose) and returns: x