code: def test_calculates_correct_tpr_fpr(self, attack_type):
      rng = np.random.RandomState(27)
      loss_train = rng.rand(100)
      loss_test = rng.rand(50) + 0.1
      result = mia._run_attack(
          AttackInputData(
              loss_train=loss_train,
              loss_test=loss_test,
              entropy_train=loss_train,
              entropy_test=loss_test,
          ),
          attack_type,
      )
      self.assertEqual(attack_type, result.attack_type)
      for tpr, fpr, threshold in zip(
          result.roc_curve.tpr,
          result.roc_curve.fpr,
          result.roc_curve.thresholds,
      ):
          self.assertAlmostEqual(tpr, np.mean(loss_train <= threshold))
          self.assertAlmostEqual(fpr, np.mean(loss_test <= threshold))
  
imports: from unittest import mock
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_privacy.privacy.privacy_tests import epsilon_lower_bound
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import membership_inference_attack
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import models
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackInputData
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackType
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import DataSize
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SingleSliceSpec
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SlicingFeature
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import SlicingSpec
label_desc: Use image node_id 15 for calling the RunAttacksTest obj's underlying member method code with example usage: obj.test_calculates_correct_tpr_fpr(attack_type) without return types