      class HeaderDict(requests.packages.urllib3._collections.HTTPHeaderDict):
          def get_all(self, key, default):
              return self.getheaders(key)
  
      class MockOriginalResponse(object):
          def __init__(self, headers):
              self.msg = HeaderDict(headers)
              self.closed = False
  
          def isclosed(self):
 
</s> remove     class Option(object):
 </s> add     class Option: </s> remove     class EndOptionGroup(object):
 </s> add     class EndOptionGroup: </s> remove class MockObject(object):
 </s> add class MockObject: </s> remove     class StartOptionGroup(object):
 </s> add     class StartOptionGroup: </s> remove         class MockPager(object):
 </s> add         class MockPager:
    class MockOriginalResponse:
      class HeaderDict(requests.packages.urllib3._collections.HTTPHeaderDict):
          def get_all(self, key, default):
              return self.getheaders(key)
  
    class MockOriginalResponse:
          def __init__(self, headers):
              self.msg = HeaderDict(headers)
              self.closed = False
  
          def isclosed(self):
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/test.py