code: def test_dict_delitem(self):
      delitem = _testcapi.dict_delitem
      dct = {"a": 1, "c": 2, "\U0001f40d": 3}
      delitem(dct, "a")
      self.assertEqual(dct, {"c": 2, "\U0001f40d": 3})
      self.assertRaises(KeyError, delitem, dct, "b")
      delitem(dct, "\U0001f40d")
      self.assertEqual(dct, {"c": 2})
  
      dct2 = DictSubclass({"a": 1, "c": 2})
      delitem(dct2, "a")
      self.assertEqual(dct2, {"c": 2})
      self.assertRaises(KeyError, delitem, dct2, "b")
  
      self.assertRaises(TypeError, delitem, {}, [])  # unhashable
      self.assertRaises(SystemError, delitem, UserDict({"a": 1}), "a")
      self.assertRaises(SystemError, delitem, [1], 0)
      self.assertRaises(SystemError, delitem, 42, "a")
  
imports: import unittest
  from collections import OrderedDict, UserDict
  from types import MappingProxyType
  from test import support
  import _testcapi
label_desc: Use image node_id 17 for calling the CAPITest obj's underlying member method code with example usage: obj.test_dict_delitem() without return types