code: def clean(self):
          
          data = self.cleaned_data
          want_scope = data.get('scope') or 0
          grant = data.get('grant')
          has_scope = grant.scope if grant else 0
  
          # Only check if we've actually got a scope in the data
          # (read: All fields have been cleaned)
          if want_scope is not 0 and not scope.check(want_scope, has_scope):
              raise OAuthValidationError({'error': 'invalid_scope'})
  
          return data
docs: Make sure that the scope is less or equal to the scope allowed on the
          grant!