def METHOD_NAME(self):
    # See issue #2521.
    class A(object):
        __metaclass__ = abc.ABCMeta
        @abc.abstractmethod
        def f(self):
            pass
    class C(A):
        def f(self):
            A.f(self)
    r = weakref.ref(C)
    # Trigger cache.
    C().f()
    del C
    test_support.gc_collect()
    self.assertEqual(r(), None)