class_docstr: Implementation of Query-Efficient Black-box Adversarial Examples. The attack approximates the gradient by
  maximizing the loss function over samples drawn from random Gaussian noise around the input.
  
  | Paper link: https://arxiv.org/abs/1712.07113
class_docstr_tok: ["Implementation","of","Query-Efficient","Black-box","Adversarial","Examples",".","The","attack","approximates","the","gradient","by","maximizing","the","loss","function","over","samples","drawn","from","random","Gaussian","noise","around","the","input",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1712.07113"]
docstr: Compute per-class derivatives w.r.t. `x`.
  
  :param x: Input with shape as expected by the classifier's model.
  :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class
                output is computed for all samples. If multiple values as provided, the first dimension should
                match the batch size of `x`, and each value will be used as target for its corresponding sample in
                `x`. If `None`, then gradients for all classes will be computed for each sample.
  :return: Array of gradients of input features w.r.t. each class in the form
           `(batch_size, nb_classes, input_shape)` when computing for all classes, otherwise shape becomes
           `(batch_size, 1, input_shape)` when `label` parameter is specified.
docstr_tok: ["Compute","per-class","derivatives","w.r.t",".","`","x","`",".",":","param","x",":","Input","with","shape","as","expected","by","the","classifier","'s","model",".",":","param","label",":","Index","of","a","specific","per-class","derivative",".","If","an","integer","is","provided",",","the","gradient","of","that","class","output","is","computed","for","all","samples",".","If","multiple","values","as","provided",",","the","first","dimension","should","match","the","batch","size","of","`","x","`",",","and","each","value","will","be","used","as","target","for","its","corresponding","sample","in","`","x","`",".","If","`","None","`",",","then","gradients","for","all","classes","will","be","computed","for","each","sample",".",":","return",":","Array","of","gradients","of","input","features","w.r.t",".","each","class","in","the","form","`","(","batch_size",",","nb_classes",",","input_shape",")","`","when","computing","for","all","classes",",","otherwise","shape","becomes","`","(","batch_size",",","1",",","input_shape",")","`","when","`","label","`","parameter","is","specified","."]
code: def class_gradient(
      self,
      x: np.ndarray,
      label: Optional[Union[int, List[int], np.ndarray]] = None,
      **kwargs,
  ) -> np.ndarray:
      """
      Compute per-class derivatives w.r.t. `x`.
  
      :param x: Input with shape as expected by the classifier's model.
      :param label: Index of a specific per-class derivative. If an integer is provided, the gradient of that class
                    output is computed for all samples. If multiple values as provided, the first dimension should
                    match the batch size of `x`, and each value will be used as target for its corresponding sample in
                    `x`. If `None`, then gradients for all classes will be computed for each sample.
      :return: Array of gradients of input features w.r.t. each class in the form
               `(batch_size, nb_classes, input_shape)` when computing for all classes, otherwise shape becomes
               `(batch_size, 1, input_shape)` when `label` parameter is specified.
      """
      raise NotImplementedError
  
imports: import logging
  from typing import List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from scipy.stats import entropy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin, ClassifierLossGradients
  from art.utils import clip_and_round
label_desc: Use image node_id 6 for calling the QueryEfficientGradientEstimationClassifier obj's underlying member method code with example usage: obj.class_gradient(x, label) without return types