class_docstr: Implementation of the Knockoff Nets attack from Orekondy et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1812.02766
docstr: Compute `div` reward value.
  
  :param y_output: Output of the victim classifier.
  :param n: Current iteration.
  :return: Reward value.
docstr_tok: ["Compute","`","div","`","reward","value",".",":","param","y_output",":","Output","of","the","victim","classifier",".",":","param","n",":","Current","iteration",".",":","return",":","Reward","value","."]
code: def _reward_div(self, y_output: np.ndarray, n: int) -> float:
      """
      Compute `div` reward value.
  
      :param y_output: Output of the victim classifier.
      :param n: Current iteration.
      :return: Reward value.
      """
      # First update y_avg
      self.y_avg = self.y_avg + (1.0 / n) * (y_output[0] - self.y_avg)
  
      # Then compute reward
      reward = 0
      for k in range(self.estimator.nb_classes):
          reward += np.maximum(0, y_output[0][k] - self.y_avg[k])
  
      return reward
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING, Union
  import numpy
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import ExtractionAttack
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import to_categorical
label_desc: Use image node_id 10 for calling the KnockoffNets obj's underlying member method code with example usage: obj._reward_div(y_output, n) and returns: reward