code: def testDuplicateRegistration(self):
      @registry.register_hparams
      def hp1():
          pass
  
      with self.assertRaisesRegexp(LookupError, "already registered"):
  
          @registry.register_hparams("hp1")
          def hp2():
              pass
  
      @registry.register_ranged_hparams
      def rhp1(_):
          pass
  
      with self.assertRaisesRegexp(LookupError, "already registered"):
  
          @registry.register_ranged_hparams("rhp1")
          def rhp2(_):
              pass
  
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 6 for calling the HParamRegistryTest obj's underlying member method code with example usage: obj.testDuplicateRegistration() without return types