def METHOD_NAME(*args, **kwargs):
    try:
        kwargs_cache_key = {(k, convert_value(v)) for k, v in kwargs.items()}
    except TypeError:
        return fn(*args, **kwargs)
    cache_key = (fn, tuple(map(convert_value, args)), frozenset(kwargs_cache_key))
    cache = get_cache()
    try:
        if cache_key in cache:
            return cache[cache_key]
    except TypeError:
        return fn(*args, **kwargs)
    else:
        result = fn(*args, **kwargs)
        if not isinstance(result, SearchStrategy) or result.is_cacheable:
            cache[cache_key] = result
        return result