def need_proxy(self, obj, attr, res):
        """
        Returns True if `attr` of `obj` whose value is `res` requires a proxy.

        obj: object
            Object whose attribute is to be returned.

        attr: string
            Name of attribute accessed.

        res: object
            Result to be returned.

        Checks `res` against registered classes to be proxied as well as
        the proxy registry for `obj.attr`.
        """
        if isinstance(res, tuple(self.proxy_types)):
            return True

        key = '%s.%s' % (id(obj), attr)
        try:
            return self.attr_proxy_map[key]
        except __HOLE__:
            return False
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/rbac.py/AccessController.need_proxy