code: def test_hard_sigmoid(self):
      layer = tl.HardSigmoid()
      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), [0.0, 0.5, 0.75, 1.0, 1.0, 1.0, 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 4 for calling the ActivationFnsTest obj's underlying member method code with example usage: obj.test_hard_sigmoid() without return types