  
  from django.http import Http404
  from django.shortcuts import get_object_or_404 as _get_object_or_404
  
  from rest_framework import views, mixins
  from rest_framework.settings import api_settings
  
 
</s> remove from django.db.models.query import QuerySet
 </s> add  </s> remove from rest_framework.utils.mediatypes import order_by_precedence, media_type_matches
from rest_framework.utils.mediatypes import _MediaType
 </s> add from rest_framework.utils.mediatypes import (
    _MediaType, order_by_precedence, media_type_matches
) </s> remove from rest_framework import HTTP_HEADER_ENCODING
from rest_framework import exceptions
 </s> add from rest_framework import exceptions, HTTP_HEADER_ENCODING
from django.db.models.query import QuerySet
  
  from django.http import Http404
from django.db.models.query import QuerySet
  from django.shortcuts import get_object_or_404 as _get_object_or_404
  
  from rest_framework import views, mixins
  from rest_framework.settings import api_settings
  
keep add keep keep keep keep keep
 Cleanup import following PEP 8 style guide 
rest_framework/generics.py