          self.main_type, sep, self.sub_type = self.full_type.partition('/')
  
      def match(self, other):
          """Return true if this MediaType satisfies the given MediaType."""
          for key in self.params.keys():
              if key != 'q' and other.params.get(key, None) != self.params.get(key, None):
                  return False
  
          if self.sub_type != '*' and other.sub_type != '*' and other.sub_type != self.sub_type:
              return False
 
</s> remove         for key in self._data.keys():
 </s> add         for key in self._data: </s> remove         columns = [key for key in header.keys() if key != 'url']
        details = [key for key in header.keys() if key != 'url']
 </s> add         columns = [key for key in header if key != 'url']
        details = [key for key in header if key != 'url'] </s> remove         elif not self.params or list(self.params.keys()) == ['q']:
 </s> add         elif not self.params or list(self.params) == ['q']: </s> remove         for key in kwargs.keys():
 </s> add         for key in kwargs: </s> remove             for key in list(field_kwargs.keys()):
 </s> add             for key in list(field_kwargs):
        for key in self.params:
          self.main_type, sep, self.sub_type = self.full_type.partition('/')
  
      def match(self, other):
          """Return true if this MediaType satisfies the given MediaType."""
        for key in self.params:
              if key != 'q' and other.params.get(key, None) != self.params.get(key, None):
                  return False
  
          if self.sub_type != '*' and other.sub_type != '*' and other.sub_type != self.sub_type:
              return False
keep keep keep keep replace keep keep keep keep keep
 Perfer iter(dict) over iter(dict.keys()) (#5736)

Calling dict.keys() is unnecessary. The two are functionally equivalent
on modern Pythons.

Inspired by Lennart Regebro's talk "Prehistoric Patterns in Python" from
PyCon 2017.

https://www.youtube.com/watch?v=V5-JH23Vk0I 
rest_framework/utils/mediatypes.py