code: def test_hard_tanh(self):
      layer = tl.HardTanh()
      x = np.array([-1.5, -0.5, -0.25, 0.0, 0.25, 0.5, 1.5])
      y = layer(x)
      self.assertEqual(
          tl.to_list(y), [-1.0, -0.5, -0.25, 0.0, 0.25, 0.5, 1.0]
      )
  
file_path: trax/trax/layers/activation_fns_test.py
imports: from absl.testing import absltest
  import numpy
  import trax.layers
label_desc: Use image node_id 5 for calling the ActivationFnsTest obj's underlying member method code with example usage: obj.test_hard_tanh() without return types