docstr: Test exposure by interpolation.
code: def test_exposure_interpolation(self):
      """Test exposure by interpolation."""
      perplexities = {
          "1": [0, 0.1],  # smallest perplexities
          "2": [20.0],  # largest perplexities
          "5": [3.5],  # rank = 4
          "8": [3.5],  # rank = 4
      }
      perplexities_reference = [float(x) for x in range(1, 17)]
      resulted_exposures = exposures.compute_exposure_interpolation(
          perplexities, perplexities_reference
      )
      num_perplexities_reference = len(perplexities_reference)
      exposure_largest = np.log2(num_perplexities_reference)
      exposure_smallest = np.log2(num_perplexities_reference) - np.log2(
          num_perplexities_reference + 1
      )
      exposure_rank4 = np.log2(num_perplexities_reference) - np.log2(4)
      expected_exposures = {
          "1": np.array([exposure_largest] * 2),
          "2": np.array([exposure_smallest]),
          "5": np.array([exposure_rank4]),
          "8": np.array([exposure_rank4]),
      }
  
      self.assertEqual(
          resulted_exposures.keys(), expected_exposures.keys()
      )
      for r in resulted_exposures.keys():
          np.testing.assert_almost_equal(
              expected_exposures[r], resulted_exposures[r]
          )
  
file_path: privacy/tensorflow_privacy/privacy/privacy_tests/secret_sharer/exposures_test.py
imports: from absl.testing import absltest
  import numpy
  from scipy import stats
  from tensorflow_privacy.privacy.privacy_tests.secret_sharer import exposures
label_desc: Use image node_id 2 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_exposure_interpolation() without return types