code: def to_chw_bgr(image):
      """
      Transpose image from HWC to CHW and from RBG to BGR.
  
      Args:
          image (np.array): an image with HWC and RBG layout.
      """
      # HWC to CHW
      if len(image.shape) == 3:
          image = np.swapaxes(image, 1, 2)
          image = np.swapaxes(image, 1, 0)
      # RBG to BGR
      image = image[[2, 1, 0], :, :]
      return image
  
file_path: PaddleHub/modules/image/face_detection/pyramidbox_face_detection/data_feed.py
imports: import os
  import time
  from collections import OrderedDict
  import cv2
  import numpy
  from PIL import Image
label_desc: Use image node_id 2 for calling a global function with example usage: to_chw_bgr(image) and returns: image