code: def test_epsilon_bounds(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
      # Therefore,
      #   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 using tpr / fpr, tnr / fnr:
      expected = {
          elb.BoundMethod.ADJUSTED_LOG: np.sort(
              [-1.02310327, -1.72826789, -0.66577858]
              + [-0.29368152, -0.16314973, -1.09474300, -3.95577741]
          )[::-1],
          elb.BoundMethod.INV_SINH: np.sort(
              [-2.05961264, -2.13876684, -0.75815925]
              + [-0.32235626, -0.18279510, -1.20631805]
          )[::-1],
      }
      lb = elb.EpsilonLowerBound(
          pos_scores,
          neg_scores,
          alpha,
          two_sided_threshold=False,
          thresholds=thresholds,
      )
      res = lb.compute_epsilon_lower_bounds(expected.keys())
      self.assertEqual(res.keys(), expected.keys())
      for method in expected:
          np.testing.assert_almost_equal(res[method], expected[method])
      # test for top-k
      k = 5
      res = lb.compute_epsilon_lower_bounds(expected.keys(), k)
      self.assertEqual(res.keys(), expected.keys())
      for method in expected:
          np.testing.assert_almost_equal(
              res[method], expected[method][:k]
          )
  
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 2 for calling the EpsilonLowerBoundTest obj's underlying member method code with example usage: obj.test_epsilon_bounds() without return types