<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)