def need_proxy(meth, result, access_controller):
    """
    Returns True if `result` from `meth` requires a proxy.
    If no proxy types have been explicitly defined for `meth` then
    `access_controller` provides a default set.

    meth: method.
        Method to be checked.

    result: object
        Result value to be checked.

    access_controller: :class:`AccessController`
        Provides default proxy type information.
    """
    try:
        roles, proxy_role, types, cache = meth._rbac
    except AttributeError:
        return False

    cls = result.__class__
    try:
        return cache[cls]
    except KeyError:
        # Check if this result class or any base classes are in types.
        if not types:
            types = tuple(access_controller.proxy_types)
        if not types:
            cache[cls] = False
        else:
            cache[cls] = isinstance(result, types)
        return cache[cls]