code: def test_list_clear(self):
      # Test PyList_Clear()
      list_clear = _testcapi.list_clear
  
      lst = [1, 2, 3]
      self.assertEqual(list_clear(lst), 0)
      self.assertEqual(lst, [])
  
      lst = []
      self.assertEqual(list_clear(lst), 0)
      self.assertEqual(lst, [])
  
      self.assertRaises(SystemError, list_clear, ())
      self.assertRaises(SystemError, list_clear, object())
  
      # Item finalizer modify the list
      lst = []
      lst.append(DelAppend(lst, "zombie"))
      list_clear(lst)
      self.assertEqual(lst, ["zombie"])
  
imports: import gc
  import weakref
  import unittest
  from test.support import import_helper
  from collections import UserList
label_desc: Use image node_id 17 for calling the CAPITest obj's underlying member method code with example usage: obj.test_list_clear() without return types