code: def test_assert_all_finite_input_finite(self):
      minval = tf.constant(dtype_util.min(self.dtype), dtype=self.dtype)
      maxval = tf.constant(dtype_util.max(self.dtype), dtype=self.dtype)
  
      # This tests if the minimum value for the dtype is detected as finite.
      self.assertAllFinite(minval)
  
      # This tests if the maximum value for the dtype is detected as finite.
      self.assertAllFinite(maxval)
  
      # This tests if a rank 3 `Tensor` with entries in the range
      # [0.4*minval, 0.4*maxval] is detected as finite.
      # The choice of range helps to avoid overflows or underflows
      # in tf.linspace calculations.
      num_elem = 1000
      shape = (10, 10, 10)
      a = tf.reshape(
          tf.linspace(0.4 * minval, 0.4 * maxval, num_elem), shape
      )
      self.assertAllFinite(a)
  
imports: import collections
  from absl import flags
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_combinations
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 2 for calling the _TestCaseTest obj's underlying member method code with example usage: obj.test_assert_all_finite_input_finite() without return types