code: def test_highly_nested_objects_encoding(self):
      # See #12051
      l, d = [], {}
      for x in range(100000):
          l, d = [l], {"k": d}
      with self.assertRaises(RecursionError):
          with support.infinite_recursion(5000):
              self.dumps(l)
      with self.assertRaises(RecursionError):
          with support.infinite_recursion(5000):
              self.dumps(d)
  
file_path: cpython/Lib/test/test_json/test_recursion.py
imports: from test import support
  from test.test_json import PyTest, CTest
label_desc: Use image node_id 5 for calling the TestRecursion obj's underlying member method code with example usage: obj.test_highly_nested_objects_encoding() without return types