code: def test_membership_leakage_tabular_diff(
      art_warning, tabular_dl_estimator, get_iris_dataset
  ):
      try:
          classifier = tabular_dl_estimator()
          extra_classifier = tabular_dl_estimator()
          (x_train, y_train), _ = get_iris_dataset
          avg_leakage, worse_leakage, std_dev = PDTP(
              classifier,
              extra_classifier,
              x_train,
              y_train,
              comparison_type=ComparisonType.DIFFERENCE,
          )
          logger.info(
              "Average PDTP leakage: %.2f", (np.average(avg_leakage))
          )
          logger.info("Max PDTP leakage: %.2f", (np.max(avg_leakage)))
          logger.info("Min PDTP leakage: %.2f", (np.min(avg_leakage)))
          assert np.all(avg_leakage >= 0.0)
          assert np.all(avg_leakage <= 1.0)
          assert np.all(
              np.around(worse_leakage, decimals=10)
              >= np.around(avg_leakage, decimals=10)
          )
          assert len(avg_leakage.shape) == 1
          assert len(worse_leakage.shape) == 1
          assert len(std_dev.shape) == 1
          assert avg_leakage.shape[0] == x_train.shape[0]
          assert worse_leakage.shape[0] == x_train.shape[0]
          assert std_dev.shape[0] == x_train.shape[0]
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/metrics/privacy/test_membership_leakage.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import pytest
  import numpy
  import random
  from art.metrics import PDTP, SHAPr, ComparisonType
  from tests.utils import ARTTestException
label_desc: Use image node_id 8 for calling a global function with example usage: test_membership_leakage_tabular_diff(art_warning, tabular_dl_estimator, get_iris_dataset) without return types