code: def testNamedRegistration(self):
      @registry.register_hparams("a")
      def my_hparams_set():
          return 7
  
      @registry.register_ranged_hparams("a")
      def my_hparams_range(_):
          pass
  
      self.assertEqual(registry.hparams("a"), my_hparams_set())
      self.assertTrue(registry.ranged_hparams("a") is my_hparams_range)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the HParamRegistryTest obj's underlying member method code with example usage: obj.testNamedRegistration() and returns: int