class_docstr: HParams unittest 
class_docstr_tok: ["HParams","unittest"]
code: def test_hparams(self):
      hparams = HParams(cls=self.__class__, name="fbank", n_mels=40)
      hparams.del_hparam("cls")
      self.assertEqual(hparams.name, "fbank")
      self.assertEqual(hparams.n_mels, 40)
      self.assertDictEqual(
          hparams.values(), {"name": "fbank", "n_mels": 40}
      )
  
      hparams.add_hparam("sr", 8000)
      self.assertEqual(hparams.sr, 8000)
  
      hparams.set_hparam("sr", 16000)
      self.assertEqual(hparams.sr, 16000)
      self.assertEqual(hparams.get("sr"), 16000)
  
      hparams.del_hparam("sr")
      self.assertJsonEqual(
          hparams.to_json(), '{"name": "fbank", "n_mels": 40}'
      )
  
      self.assertEqual("name" in hparams, True)
      self.assertEqual(hparams["name"], "fbank")
      self.assertEqual(hparams["n_mels"], 40)
  
      hparams["n_mels"] = 80
      self.assertEqual(hparams["n_mels"], 80)
  
      hparams2 = copy.deepcopy(hparams)
      self.assertEqual(hparams == hparams2, True)
      self.assertEqual(hparams != hparams2, False)
  
      hparams2["name"] = "MFCC"
      self.assertEqual(hparams == hparams2, False)
      self.assertEqual(hparams != hparams2, True)
  
imports: import copy
  import delta.compat
  from delta.utils.hparam import HParams
label_desc: Use image node_id 1 for calling the HParamsTest obj's underlying member method code with example usage: obj.test_hparams() without return types