class_docstr: Class allowing to aggregate multiple classifiers as an ensemble. The individual classifiers are expected to be
  trained when the ensemble is created and no training procedures are provided through this class.
docstr: Compute the gradient of the loss function w.r.t. `x`.
  
  :param x: Sample input with shape as expected by the model.
  :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape
            (nb_samples,).
  :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
  :param raw: Return the individual classifier raw outputs (not aggregated).
  :return: Array of gradients of the same shape as `x`. If `raw=True`, shape becomes `[nb_classifiers, x.shape]`.
docstr_tok: ["Compute","the","gradient","of","the","loss","function","w.r.t",".","`","x","`",".",":","param","x",":","Sample","input","with","shape","as","expected","by","the","model",".",":","param","y",":","Target","values","(","class","labels",")","one-hot-encoded","of","shape","(","nb_samples",",","nb_classes",")","or","indices","of","shape","(","nb_samples",",",")",".",":","param","training_mode",":","`","True","`","for","model","set","to","training","mode","and","`","'False","`","for","model","set","to","evaluation","mode",".",":","param","raw",":","Return","the","individual","classifier","raw","outputs","(","not","aggregated",")",".",":","return",":","Array","of","gradients","of","the","same","shape","as","`","x","`",".","If","`","raw=True","`",",","shape","becomes","`","[","nb_classifiers",",","x.shape","]","`","."]
code: def loss_gradient(  # pylint: disable=W0221
      self,
      x: np.ndarray,
      y: np.ndarray,
      training_mode: bool = False,
      raw: bool = False,
      **kwargs,
  ) -> np.ndarray:
      """
      Compute the gradient of the loss function w.r.t. `x`.
  
      :param x: Sample input with shape as expected by the model.
      :param y: Target values (class labels) one-hot-encoded of shape (nb_samples, nb_classes) or indices of shape
                (nb_samples,).
      :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
      :param raw: Return the individual classifier raw outputs (not aggregated).
      :return: Array of gradients of the same shape as `x`. If `raw=True`, shape becomes `[nb_classifiers, x.shape]`.
      """
      grads = np.array(
          [
              self.classifier_weights[i]
              * self.classifiers[i].loss_gradient(
                  x=x, y=y, training_mode=training_mode, **kwargs
              )
              for i in range(self._nb_classifiers)
          ]
      )
      if raw:
          return grads
  
      return np.sum(grads, axis=0)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from art.estimators.classification.classifier import ClassifierNeuralNetwork
  from art.estimators.estimator import NeuralNetworkMixin
label_desc: Use image node_id 11 for calling the EnsembleClassifier obj's underlying member method code with example usage: obj.loss_gradient(x, y, training_mode, raw) and returns: np, grads