code: def setUpClass(cls):
      master_seed(seed=1234, set_tensorflow=True)
      super().setUpClass()
  
      cls.n_train = 100
      cls.n_test = 11
      cls.x_train_mnist = cls.x_train_mnist[0 : cls.n_train]
      cls.y_train_mnist = cls.y_train_mnist[0 : cls.n_train]
      cls.x_test_mnist = cls.x_test_mnist[0 : cls.n_test]
      cls.y_test_mnist = cls.y_test_mnist[0 : cls.n_test]
  
      model = load_model(
          join(
              *[
                  dirname(dirname(dirname(__file__))),
                  "utils",
                  "data",
                  "test_models",
                  "model_test_functionally_equivalent_extraction.h5",
              ]
          )
      )
  
      np.random.seed(0)
      num_neurons = 16
      img_rows = 28
      img_cols = 28
      num_channels = 1
  
      x_train = cls.x_train_mnist.reshape(
          cls.n_train, img_rows, img_cols, num_channels
      )
      x_test = cls.x_test_mnist.reshape(
          cls.n_test, img_rows, img_cols, num_channels
      )
  
      x_train = x_train.reshape(
          (x_train.shape[0], num_channels * img_rows * img_cols)
      ).astype("float64")
      x_test = x_test.reshape(
          (x_test.shape[0], num_channels * img_rows * img_cols)
      ).astype("float64")
  
      mean = np.mean(x_train)
      std = np.std(x_train)
  
      x_train = (x_train - mean) / std
  
      classifier = KerasClassifier(
          model=model, use_logits=True, clip_values=(0, 1)
      )
  
      cls.fee = FunctionallyEquivalentExtraction(
          classifier=classifier, num_neurons=num_neurons
      )
      fee_extracted = cls.fee.extract(
          x_train[0:10],
          fraction_true=0.1,
          delta_0=6,
          delta_value_max=1,
          d2_min=0.00000000000000000001,
          ftol=0.01,
      )
      fee_extracted.predict(x=x_test)
  
file_path: adversarial-robustness-toolbox/tests/attacks/test_functionally_equivalent_extraction.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  from os.path import dirname, join
  import numpy
  import tensorflow
  from tensorflow.keras.models import load_model
  from art.attacks.extraction.functionally_equivalent_extraction import FunctionallyEquivalentExtraction
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.utils import TestBase, master_seed
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 1 for calling the TestFunctionallyEquivalentExtraction obj's underlying member method code with example usage: obj.setUpClass(cls) without return types