class_docstr: Tests compute_score_offset.
class_docstr_tok: ["Tests","compute_score_offset","."]
code: def test_compute_score_offset(self, option, median_or_mean, expected):
      scores = amia.compute_score_offset(
          self.stat_target,
          self.stat_in,
          self.stat_out,
          option,
          median_or_mean,
      )
      np.testing.assert_allclose(scores, expected, atol=1e-7)
      # If `option` is "in" (resp. out), test with `stat_out` (resp. `stat_out`)
      # setting to empty list.
      if option == "in":
          scores = amia.compute_score_offset(
              self.stat_target, self.stat_in, [], option, median_or_mean
          )
          np.testing.assert_allclose(scores, expected, atol=1e-7)
      elif option == "out":
          scores = amia.compute_score_offset(
              self.stat_target,
              [],
              self.stat_out,
              option,
              median_or_mean,
          )
          np.testing.assert_allclose(scores, expected, atol=1e-7)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import advanced_mia
label_desc: Use image node_id 2 for calling the TestScoreOffset obj's underlying member method code with example usage: obj.test_compute_score_offset(option, median_or_mean, expected) without return types