code: def test_performance_diff(self):
      from art.estimators.classification.scikitlearn import (
          SklearnClassifier,
      )
      from sklearn.svm import SVC
  
      (x_train, y_train), (x_test, y_test), min_, max_ = load_iris()
  
      full_model = SklearnClassifier(
          model=SVC(kernel="linear", gamma="auto"),
          clip_values=(min_, max_),
      )
      full_model.fit(x_train, y_train)
  
      limited_model = SklearnClassifier(
          model=SVC(kernel="linear", gamma="auto"),
          clip_values=(min_, max_),
      )
      limited_model.fit(x_train[:10], y_train[:10])
  
      self.assertEqual(
          performance_diff(
              full_model,
              limited_model,
              x_test[:20],
              y_test[:20],
              perf_function="accuracy",
          ),
          0.35,
      )
      self.assertEqual(
          performance_diff(
              full_model, limited_model, x_test[:20], y_test[:20]
          ),
          0.35,
      )
      diff = performance_diff(
          full_model,
          limited_model,
          x_test[:20],
          y_test[:20],
          perf_function="f1",
          average="weighted",
      )
      self.assertGreater(diff, 0.43)
      self.assertLess(diff, 0.44)
  
      def first_class(true_labels, model_labels, idx=0):
          return np.average(np.argmax(model_labels, axis=1) == idx)
  
      self.assertEqual(
          performance_diff(
              full_model,
              limited_model,
              x_test,
              y_test,
              perf_function=first_class,
          ),
          1.0 / 3,
      )
      self.assertEqual(
          performance_diff(
              full_model,
              limited_model,
              x_test,
              y_test,
              perf_function=first_class,
              idx=1,
          ),
          -1.0 / 3,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import tensorflow
  from art.utils import projection, random_sphere, uniform_sample_from_sphere_or_ball, to_categorical, least_likely_class
  from art.utils import load_dataset, load_iris, load_mnist, load_nursery, load_cifar10
  from art.utils import second_most_likely_class, random_targets, get_label_conf, get_labels_np_array, preprocess
  from art.utils import compute_success_array, compute_success, check_and_transform_label_format
  from art.utils import segment_by_class, performance_diff
  from art.utils import is_probability
  from tests.utils import master_seed
label_desc: Use image node_id 25 for calling the TestUtils obj's underlying member method code with example usage: obj.test_performance_diff() and returns: np