code: def testMode(self, loc, scale, low, high):
      dist = truncated_normal.TruncatedNormal(
          loc=loc, scale=scale, low=low, high=high, validate_args=True
      )
      mode = self.evaluate(dist.mode()).item()
      if loc < low:
          expected_mode = low
      elif loc > high:
          expected_mode = high
      else:
          expected_mode = loc
      self.assertAlmostEqual(mode, expected_mode)
  
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 14 for calling the TruncatedNormalStandaloneTestCase obj's underlying member method code with example usage: obj.testMode(loc, scale, low, high) without return types