  
  except (ImportError, ImproperlyConfigured):
      oauth_provider = None
      oauth_provider_store = None
  
  # OAuth 2 support is optional
  try:
      import provider.oauth2 as oauth2_provider
      from provider.oauth2 import models as oauth2_provider_models
 
</s> remove         from oauth_provider.models import Consumer, Resource
 </s> add         from oauth_provider.models import Consumer, Scope </s> remove         return oauth_provider_store.check_nonce(request, oauth_request,
            oauth_request['oauth_nonce'], oauth_request['oauth_timestamp'])
 </s> add         oauth_nonce = oauth_request['oauth_nonce']
        oauth_timestamp = oauth_request['oauth_timestamp']
        return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp) </s> remove from rest_framework.compat import oauth2_provider, provider_now
 </s> add from rest_framework.compat import oauth2_provider, provider_now, check_nonce
    check_nonce = None
  
  except (ImportError, ImproperlyConfigured):
      oauth_provider = None
      oauth_provider_store = None
    check_nonce = None
  
  # OAuth 2 support is optional
  try:
      import provider.oauth2 as oauth2_provider
      from provider.oauth2 import models as oauth2_provider_models
keep keep keep add keep keep keep keep keep
 Compat fixes for django-oauth-plus versions 2.0-2.2.1 
rest_framework/compat.py