code: def get_image_grad(net, image, class_id=None):
      """Get the gradients of the image.
  
      Parameters:
      ----------
      net: Block
          Network to use for visualization.
      image: NDArray
          Preprocessed image to use for visualization.
      class_id: int
          Category ID this image belongs to. If not provided,
          network's prediction will be used."""
      return _get_grad(net, image, class_id, image_grad=True)
  
imports: from __future__ import print_function
  import mxnet
  from mxnet import gluon, np, npx
  from mxnet import autograd
  from mxnet.gluon import nn
  import numpy
  import cv2
label_desc: Use image node_id 5 for calling a global function with example usage: get_image_grad(net, image, class_id) and returns: _get_grad