code: def testSampleWithZeroCountsAndNanSuccessProbability(self):
      # With zero counts, should sample 0 successes even if success probability is
      # nan; and should not interfere with the rest of the batch.
      total_count = tf.constant([23.0, 0.0], dtype=tf.float32)
      probs = tf.constant([1.0, np.nan], dtype=tf.float32)
      dist = binomial_lib.Binomial(
          total_count=total_count, probs=probs, validate_args=False
      )
      samples, expected_samples = self.evaluate(
          (dist.sample(seed=test_util.test_seed()), total_count)
      )
      self.assertAllEqual(samples, expected_samples)
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import binomial
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 26 for calling the BinomialTest obj's underlying member method code with example usage: obj.testSampleWithZeroCountsAndNanSuccessProbability() without return types