code: def test_list_setitem(self):
      # Test PyList_SetItem()
      setitem = _testcapi.list_setitem
      lst = [1, 2, 3]
      setitem(lst, 0, 10)
      self.assertEqual(lst, [10, 2, 3])
      setitem(lst, 2, 12)
      self.assertEqual(lst, [10, 2, 12])
      self.assertRaises(IndexError, setitem, lst, 3, 5)
      self.assertRaises(IndexError, setitem, lst, -1, 5)
      self.assertRaises(IndexError, setitem, lst, PY_SSIZE_T_MIN, 5)
      self.assertRaises(IndexError, setitem, lst, PY_SSIZE_T_MAX, 5)
      self.assertRaises(SystemError, setitem, (1, 2, 3), 1, 5)
      self.assertRaises(SystemError, setitem, {1: 2}, 1, 5)
  
imports: import gc
  import weakref
  import unittest
  from test.support import import_helper
  from collections import UserList
label_desc: Use image node_id 8 for calling the CAPITest obj's underlying member method code with example usage: obj.test_list_setitem() without return types