human
Complete this python program:
def admin_or_self(method):
assistant
#Here is the Python program you requested.

    """Decorator for restricting access to either the target service or admin
    """
    def decorated_method(self, name):
        current = self.get_current_user()
        if (current is None):
            raise web.HTTPError(403)
        if (not current.admin):
            if (not isinstance(current, orm.Service)):
                raise web.HTTPError(403)
            if (current.name != name):
                raise web.HTTPError(403)
        if (name not in self.services):
            raise web.HTTPError(404)
        return method(self, name)
    return decorated_method