code: def testSetHParamTypeMismatch(self):
      hparams = hparam.HParams(
          int_=1,
          str_="str",
          bool_=True,
          float_=1.1,
          list_int=[1, 2],
          none=None,
      )
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("str_", 2.2)
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("int_", False)
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("bool_", 1)
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("int_", 2.2)
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("list_int", [2, 3.3])
  
      with self.assertRaises(ValueError):
          hparams.set_hparam("int_", "2")
  
      # Casting int to float is OK
      hparams.set_hparam("float_", 1)
  
      # Getting stuck with NoneType :(
      hparams.set_hparam("none", "1")
      self.assertEqual("1", hparams.none)
  
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 30 for calling the HParamsTest obj's underlying member method code with example usage: obj.testSetHParamTypeMismatch() without return types