code: def test_assert_all_finite_input_inf(self):
      # This tests if np.inf is detected as non-finite.
      num_elem = 1000
      shape = (10, 10, 10)
      a = np.linspace(0.0, 1.0, num_elem)
      a[100] = np.inf
      a = tf.reshape(
          tf.convert_to_tensor(value=a, dtype=self.dtype), shape
      )
      with self.assertRaisesRegex(
          AssertionError, "Arrays are not equal"
      ):
          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 4 for calling the _TestCaseTest obj's underlying member method code with example usage: obj.test_assert_all_finite_input_inf() without return types