code: def testBatesPDFonNaNs(self):
      for b in [bates.Bates(1, 0, 1), bates.Bates(4, -10, -8)]:
          values_with_nans = [
              np.nan,
              -1.0,
              np.nan,
              0.0,
              np.nan,
              0.5,
              np.nan,
              1.0,
              np.nan,
              2.0,
              np.nan,
          ]
          values = [
              v if i % 2 != 0 else 0.0
              for i, v in enumerate(values_with_nans)
          ]
          probs = self.evaluate(b.log_prob(values))
          probs_with_nans = self.evaluate(b.log_prob(values_with_nans))
          should_be_nan = [
              probs_with_nans[i]
              for i, v in enumerate(values_with_nans)
              if np.isnan(v)
          ]
          self.assertAllNan(should_be_nan)
          lhs = [
              probs[i]
              for i, v in enumerate(values_with_nans)
              if not np.isnan(v)
          ]
          rhs = [
              probs_with_nans[i]
              for i, v in enumerate(values_with_nans)
              if not np.isnan(v)
          ]
          self.assertAllEqual(lhs, rhs)
  
imports: import fractions
  import math
  import sys
  from absl.testing import parameterized
  import hypothesis
  import hypothesis.strategies
  import numpy
  import scipy
  import scipy.integrate
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bates
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 19 for calling the BatesTest obj's underlying member method code with example usage: obj.testBatesPDFonNaNs() without return types