code: def test_weird_floats(self):
      for enum, expected in zip(
          WierdNum, ("Infinity", "-Infinity", "NaN")
      ):
          self.assertEqual(self.dumps(enum), expected)
          if not isnan(enum):
              self.assertEqual(float(self.dumps(enum)), enum)
              self.assertEqual(self.loads(self.dumps(enum)), enum)
          else:
              self.assertTrue(isnan(float(self.dumps(enum))))
              self.assertTrue(isnan(self.loads(self.dumps(enum))))
  
imports: from enum import Enum, IntEnum
  from math import isnan
  from test.test_json import PyTest, CTest
label_desc: Use image node_id 2 for calling the TestEnum obj's underlying member method code with example usage: obj.test_weird_floats() without return types