code: def test_attrgetter(self):
      from operator import attrgetter
  
      ser = CloudPickleSerializer()
  
      class C:
          def __getattr__(self, item):
              return item
  
      d = C()
      getter = attrgetter("a")
      getter2 = ser.loads(ser.dumps(getter))
      self.assertEqual(getter(d), getter2(d))
      getter = attrgetter("a", "b")
      getter2 = ser.loads(ser.dumps(getter))
      self.assertEqual(getter(d), getter2(d))
  
      d.e = C()
      getter = attrgetter("e.a")
      getter2 = ser.loads(ser.dumps(getter))
      self.assertEqual(getter(d), getter2(d))
      getter = attrgetter("e.a", "e.b")
      getter2 = ser.loads(ser.dumps(getter))
      self.assertEqual(getter(d), getter2(d))
  
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 4 for calling the SerializationTestCase obj's underlying member method code with example usage: obj.test_attrgetter() and returns: item