class_docstr: Implementation of Randomized Smoothing applied to classifier predictions and gradients, as introduced
  in Cohen et al. (2019).
  
  | Paper link: https://arxiv.org/abs/1902.02918
docstr: Compute the gradient of the given classifier's loss function w.r.t. `x` of the original classifier.
  :param x: Sample input with shape as expected by the model.
  :param y: Correct labels, one-hot encoded.
  :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
  :return: Array of gradients of the same shape as `x`.
docstr_tok: ["Compute","the","gradient","of","the","given","classifier","'s","loss","function","w.r.t",".","`","x","`","of","the","original","classifier",".",":","param","x",":","Sample","input","with","shape","as","expected","by","the","model",".",":","param","y",":","Correct","labels",",","one-hot","encoded",".",":","param","training_mode",":","`","True","`","for","model","set","to","training","mode","and","`","'False","`","for","model","set","to","evaluation","mode",".",":","return",":","Array","of","gradients","of","the","same","shape","as","`","x","`","."]
code: def loss_gradient(  # pylint: disable=W0221
      self,
      x: np.ndarray,
      y: np.ndarray,
      training_mode: bool = False,
      **kwargs,
  ) -> np.ndarray:
      """
      Compute the gradient of the given classifier's loss function w.r.t. `x` of the original classifier.
      :param x: Sample input with shape as expected by the model.
      :param y: Correct labels, one-hot encoded.
      :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
      :return: Array of gradients of the same shape as `x`.
      """
      return self.classifier.loss_gradient(
          x=x, y=y, training_mode=training_mode, **kwargs
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Union, TYPE_CHECKING, Tuple
  import warnings
  import numpy
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin, NeuralNetworkMixin
  from art.estimators.certification.randomized_smoothing.randomized_smoothing import RandomizedSmoothingMixin
  from art.estimators.classification import ClassifierMixin, ClassGradientsMixin
  from art.defences.preprocessor.gaussian_augmentation import GaussianAugmentation
label_desc: Use image node_id 5 for calling the NumpyRandomizedSmoothing obj's underlying member method code with example usage: obj.loss_gradient(x, y, training_mode) and returns: self