class_docstr: Implementation of the Knockoff Nets attack from Orekondy et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1812.02766
docstr: Compute `cert` reward value.
  
  :param y_output: Output of the victim classifier.
  :return: Reward value.
docstr_tok: ["Compute","`","cert","`","reward","value",".",":","param","y_output",":","Output","of","the","victim","classifier",".",":","return",":","Reward","value","."]
code: def _reward_cert(y_output: np.ndarray) -> float:
      """
      Compute `cert` reward value.
  
      :param y_output: Output of the victim classifier.
      :return: Reward value.
      """
      largests = np.partition(y_output.flatten(), -2)[-2:]
      reward = largests[1] - largests[0]
  
      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 9 for calling the KnockoffNets obj's underlying member method code with example usage: obj._reward_cert(y_output) and returns: reward