code: def imdecode(str_img, flag=1):
      """Decode image from str buffer.
      Wrapper for cv2.imdecode that uses mx.nd.NDArray
  
      Parameters
      ----------
      str_img : str
          str buffer read from image file
      flag : int
          same as flag for cv2.imdecode
      Returns
      -------
      img : NDArray
          decoded image in (width, height, channels)
          with BGR color channel order
      """
      hdl = NDArrayHandle()
      check_call(
          _LIB.MXCVImdecode(
              ctypes.c_char_p(str_img),
              mx_uint(len(str_img)),
              flag,
              ctypes.byref(hdl),
          )
      )
      return mx.nd.NDArray(hdl)
  
file_path: mxnet/plugin/opencv/opencv.py
imports: import random
  import ctypes
  import cv2
  import mxnet
  from mxnet.base import _LIB
  from mxnet.base import mx_uint, NDArrayHandle, check_call
label_desc: Use image node_id 1 for calling a global function with example usage: imdecode(str_img, flag) and returns: mx