code: def test_encode_mutated(self):
      a = [object()] * 10
  
      def crasher(obj):
          del a[-1]
  
      self.assertEqual(
          self.dumps(a, default=crasher),
          "[null, null, null, null, null]",
      )
  
file_path: cpython/Lib/test/test_json/test_dump.py
imports: from io import StringIO
  from test.test_json import PyTest, CTest
  from test.support import bigmemtest, _1G
label_desc: Use image node_id 5 for calling the TestDump obj's underlying member method code with example usage: obj.test_encode_mutated() without return types