code: def test_func_globals(self):
      class Unpicklable:
          def __reduce__(self):
              raise RuntimeError("not picklable")
  
      global exit
      exit = Unpicklable()
  
      ser = CloudPickleSerializer()
      self.assertRaises(Exception, lambda: ser.dumps(exit))
  
      def foo():
          sys.exit(0)
  
      self.assertTrue("exit" in foo.__code__.co_names)
      ser.dumps(foo)
  
imports: import math
  import sys
  import unittest
  from pyspark import serializers
  from pyspark.serializers import CloudPickleSerializer, CompressedSerializer, AutoBatchedSerializer, BatchedSerializer, AutoSerializer, NoOpSerializer, PairDeserializer, FlattenedValuesSerializer, CartesianDeserializer, CPickleSerializer, UTF8Deserializer, MarshalSerializer
  from pyspark.testing.utils import PySparkTestCase, read_int, write_int, ByteArrayOutput, have_numpy, have_scipy
label_desc: Use image node_id 6 for calling the SerializationTestCase obj's underlying member method code with example usage: obj.test_func_globals() without return types