code: def test_dict_clear(self):
      clear = _testcapi.dict_clear
      dct = {1: 2}
      clear(dct)
      self.assertEqual(dct, {})
  
      # NOTE: It is not safe to call it with OrderedDict.
  
      # Has no effect for non-dicts.
      dct = UserDict({1: 2})
      clear(dct)
      self.assertEqual(dct, {1: 2})
      lst = [1, 2]
      clear(lst)
      self.assertEqual(lst, [1, 2])
      clear(object())
  
imports: import unittest
  from collections import OrderedDict, UserDict
  from types import MappingProxyType
  from test import support
  import _testcapi
label_desc: Use image node_id 6 for calling the CAPITest obj's underlying member method code with example usage: obj.test_dict_clear() without return types