code: def testGet(self):
      hparams = hparam.HParams(
          aaa=1, b=2.0, c_c="relu6", d=True, e=[5.0, 6.0]
      )
  
      # Existing parameters with default=None.
      self.assertEqual(1, hparams.get("aaa"))
      self.assertEqual(2.0, hparams.get("b"))
      self.assertEqual("relu6", hparams.get("c_c"))
      self.assertEqual(True, hparams.get("d"))
      self.assertEqual([5.0, 6.0], hparams.get("e", None))
  
      # Existing parameters with compatible defaults.
      self.assertEqual(1, hparams.get("aaa", 2))
      self.assertEqual(2.0, hparams.get("b", 3.0))
      self.assertEqual(2.0, hparams.get("b", 3))
      self.assertEqual("relu6", hparams.get("c_c", "default"))
      self.assertEqual(True, hparams.get("d", True))
      self.assertEqual([5.0, 6.0], hparams.get("e", [1.0, 2.0, 3.0]))
      self.assertEqual([5.0, 6.0], hparams.get("e", [1, 2, 3]))
  
      # Existing parameters with incompatible defaults.
      with self.assertRaises(ValueError):
          hparams.get("aaa", 2.0)
  
      with self.assertRaises(ValueError):
          hparams.get("b", False)
  
      with self.assertRaises(ValueError):
          hparams.get("c_c", [1, 2, 3])
  
      with self.assertRaises(ValueError):
          hparams.get("d", "relu")
  
      with self.assertRaises(ValueError):
          hparams.get("e", 123.0)
  
      with self.assertRaises(ValueError):
          hparams.get("e", ["a", "b", "c"])
  
      # Nonexistent parameters.
      self.assertEqual(None, hparams.get("unknown"))
      self.assertEqual(123, hparams.get("unknown", 123))
      self.assertEqual([1, 2, 3], hparams.get("unknown", [1, 2, 3]))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.utils import hparam
  import tensorflow.compat.v1
label_desc: Use image node_id 31 for calling the HParamsTest obj's underlying member method code with example usage: obj.testGet() without return types