code: def test_issue31311(self):
      # __setstate__ should neither raise a SystemError nor crash in case
      # of a bad __dict__.
      from ctypes import Structure
  
      class BadStruct(Structure):
          @property
          def __dict__(self):
              pass
  
      with self.assertRaises(TypeError):
          BadStruct().__setstate__({}, b"foo")
  
      class WorseStruct(Structure):
          @property
          def __dict__(self):
              1 / 0.0
  
      with self.assertRaises(ZeroDivisionError):
          WorseStruct().__setstate__({}, b"foo")
  
file_path: catboost/contrib/tools/python/src/Lib/ctypes/test/test_parameters.py
imports: import unittest, sys
  from ctypes.test import need_symbol
  import test.support
label_desc: Use image node_id 13 for calling the SimpleTypesTestCase obj's underlying member method code with example usage: obj.test_issue31311() without return types