code: def test_epsilon_bound(self):
      pos_scores = np.array([9, 4, 5, 0.0])
      neg_scores = np.array([3, 8, 6, 1, 2, 7])
      thresholds = np.array([9.5, 8.5, 5.5, 0.5])
      alpha = 0.05
      method = elb.BoundMethod.ADJUSTED_LOG
      # Therefore,
      #   pos_size = 4, neg_size = 6
      #   tp = [0, 1, 1, 3]
      #   fp = [0, 0, 3, 6]
      #   fn = [4, 3, 3, 1]
      #   tn = [6, 6, 3, 0]
      # The expected epsilon bounds for the four ratios:
      tpr_fpr = [-1.02310327, -1.72826789, -0.66577858]
      tnr_fnr = [-0.29368152, -0.16314973, -1.09474300, -3.95577741]
      fpr_tpr = [-3.95577741, -0.76912173, -0.16314973]
      fnr_tnr = [-0.36916217, -0.66577858, -0.35929344, -1.02310327]
      expected_one_sided = np.sort(tpr_fpr + tnr_fnr)[::-1]
      expected_two_sided = np.sort(
          tpr_fpr + tnr_fnr + fpr_tpr + fnr_tnr
      )[::-1]
  
      common_kwargs = {
          "pos_scores": pos_scores,
          "neg_scores": neg_scores,
          "alpha": alpha,
          "thresholds": thresholds,
      }
  
      # one-sided
      lb = elb.EpsilonLowerBound(
          two_sided_threshold=False, **common_kwargs
      )
      np.testing.assert_almost_equal(
          lb.compute_epsilon_lower_bound(method), expected_one_sided
      )
  
      # two-sided
      lb = elb.EpsilonLowerBound(
          two_sided_threshold=True, **common_kwargs
      )
      np.testing.assert_almost_equal(
          lb.compute_epsilon_lower_bound(method), expected_two_sided
      )
  
      # test for top-k
      k = 5
      np.testing.assert_almost_equal(
          lb.compute_epsilon_lower_bound(method, k),
          expected_two_sided[:k],
      )
      k = 100
      np.testing.assert_almost_equal(
          lb.compute_epsilon_lower_bound(method, k), expected_two_sided
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_privacy.privacy.privacy_tests import epsilon_lower_bound
label_desc: Use image node_id 1 for calling the EpsilonLowerBoundTest obj's underlying member method code with example usage: obj.test_epsilon_bound() without return types