def method_cache_counter(space, name):
    """Return a tuple (method_cache_hits, method_cache_misses) for calls to
    methods with the name."""
    assert space.config.objspace.std.withmethodcachecounter
    ec = space.getexecutioncontext()
    return space.newtuple([space.newint(ec.method_cache_hits.get(name, 0)),
                           space.newint(ec.method_cache_misses.get(name, 0)),])