class_docstr: Test by comparing TruncatedNormals with wide bounds and unbounded Normal.
    
class_docstr_tok: ["Test","by","comparing","TruncatedNormals","with","wide","bounds","and","unbounded","Normal","."]
code: def testLogProb(self, loc, scale):
      truncated_dist, normal_dist = self.constructDists(
          loc, scale, validate_args=False
      )
      low = self.evaluate(truncated_dist.low)
      high = self.evaluate(truncated_dist.high)
      test_x = list(np.float32(np.random.uniform(low, high, 10)))
      test_x += [low, high, low + EPSILON, high - EPSILON]
      tr_log_prob = self.evaluate(truncated_dist.log_prob(test_x))
      n_log_prob = self.evaluate(normal_dist.log_prob(test_x))
      self.assertAllClose(tr_log_prob, n_log_prob, rtol=1e-4, atol=1e-4)
  
      no_support_log_prob = self.evaluate(
          truncated_dist.log_prob(
              np.float32(
                  [
                      low - EPSILON,
                      high + EPSILON,
                      low - 100.0,
                      high + 100.0,
                  ]
              )
          )
      )
      self.assertAllEqual(
          no_support_log_prob, [np.log(0.0)] * len(no_support_log_prob)
      )
  
imports: import itertools
  import unittest
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import truncated_normal
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 4 for calling the TruncatedNormalTestCompareWithNormal obj's underlying member method code with example usage: obj.testLogProb(loc, scale) without return types