code: def test_dict_setitemstring(self):
      setitemstring = _testcapi.dict_setitemstring
      dct = {}
      setitemstring(dct, b"a", 5)
      self.assertEqual(dct, {"a": 5})
      setitemstring(dct, "\U0001f40d".encode(), 8)
      self.assertEqual(dct, {"a": 5, "\U0001f40d": 8})
  
      dct2 = DictSubclass()
      setitemstring(dct2, b"a", 5)
      self.assertEqual(dct2, {"a": 5})
  
      self.assertRaises(
          UnicodeDecodeError, setitemstring, {}, INVALID_UTF8, 5
      )
      self.assertRaises(SystemError, setitemstring, UserDict(), b"a", 5)
      self.assertRaises(SystemError, setitemstring, 42, b"a", 5)
  
imports: import unittest
  from collections import OrderedDict, UserDict
  from types import MappingProxyType
  from test import support
  import _testcapi
label_desc: Use image node_id 16 for calling the CAPITest obj's underlying member method code with example usage: obj.test_dict_setitemstring() without return types