async def METHOD_NAME():
    """Ensure that we aren't leaking memory"""
    x = 42
    instance_caches = defaultdict(dict)
    class TestClass:
        @async_ttl_cache(ttl=None, cleanup_self=True, cache=instance_caches)
        async def f(self):
            return x
    o1 = TestClass()
    w1 = weakref.ref(o1)
    assert w1() is not None
    assert await o1.f() == x
    assert len(instance_caches) == 1
    assert list(instance_caches.keys())[0]() == o1
    del o1
    assert len(instance_caches) == 0
    assert w1() is None
    o2, o3, o4 = TestClass(), TestClass(), TestClass()
    assert await o2.f() == x
    assert await o3.f() == x
    assert await o4.f() == x
    assert len(instance_caches) == 3
    del o2, o4
    assert len(instance_caches) == 1
    del o3
    assert len(instance_caches) == 0