def METHOD_NAME(self):
    # This test shows a leak in refleak mode if atexit doesn't
    # take care to free callbacks in its per-subinterpreter module
    # state.
    n = atexit._ncallbacks()
    code = r"""if 1:
        import atexit
        def f():
            pass
        atexit.register(f)
        del atexit
        """
    ret = support.run_in_subinterp(code)
    self.assertEqual(ret, 0)
    self.assertEqual(atexit._ncallbacks(), n)