class_docstr: Implementation of the Knockoff Nets attack from Orekondy et al. (2018).
  
  | Paper link: https://arxiv.org/abs/1812.02766
docstr: Extract with the random sampling strategy.
  
  :param x: An array with the source input to the victim classifier.
  :param thieved_classifier: A thieved classifier to be stolen.
  :return: The stolen classifier.
docstr_tok: ["Extract","with","the","random","sampling","strategy",".",":","param","x",":","An","array","with","the","source","input","to","the","victim","classifier",".",":","param","thieved_classifier",":","A","thieved","classifier","to","be","stolen",".",":","return",":","The","stolen","classifier","."]
code: def _random_extraction(
      self, x: np.ndarray, thieved_classifier: "CLASSIFIER_TYPE"
  ) -> "CLASSIFIER_TYPE":
      """
      Extract with the random sampling strategy.
  
      :param x: An array with the source input to the victim classifier.
      :param thieved_classifier: A thieved classifier to be stolen.
      :return: The stolen classifier.
      """
      # Select data to attack
      selected_x = self._select_data(x)
  
      # Query the victim classifier
      fake_labels = self._query_label(selected_x)
  
      # Train the thieved classifier
      thieved_classifier.fit(
          x=selected_x,
          y=fake_labels,
          batch_size=self.batch_size_fit,
          nb_epochs=self.nb_epochs,
          verbose=False,
      )
  
      return thieved_classifier
  
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 3 for calling the KnockoffNets obj's underlying member method code with example usage: obj._random_extraction(x, thieved_classifier) and returns: thieved_classifier