    def wrap(method):
        """The actual decorator"""

        @wraps(method)
        @authenticated
        def wrapped(self, *args, **kwargs):
            self.hub_scopes = scopes
            return method(self, *args, **kwargs)

        return wrapped
The actual decorator
examples/custom-scopes/grades.py