code: def test_str_2_bool(self):
      for i in ("yes", "true", "t", "y", "1", True):
          self.assertTrue(str2bool(i))
      for i in ("no", "false", "f", "n", "0", False):
          self.assertFalse(str2bool(i))
      for bad_value in ("test", 0, 1, 2, None):
          self.assertFalse(
              str2bool(bad_value, default=False, raise_exc=False)
          )
          self.assertTrue(
              str2bool(bad_value, default=True, raise_exc=False)
          )
          with self.assertRaises(ValueError):
              self.assertTrue(str2bool(bad_value))
  
imports: from __future__ import annotations
  import unittest
  from monai.utils.misc import str2bool
label_desc: Use image node_id 1 for calling the TestStr2Bool obj's underlying member method code with example usage: obj.test_str_2_bool() without return types