code: def _get_name_from_accept(self, request):
          
  
          accepts = util.parse_accept_header(request.META.get("HTTP_ACCEPT", ""))
          if not accepts:
              return None
  
          for accept in accepts:
              if accept[0] in self._datamappers:
                  return accept[0]
          raise errors.NotAcceptable()
docs: Process the Accept HTTP header.
  
          Find the most suitable mapper that the client wants and we support.
  
          :returns: the preferred mapper based on the accept header or ``None``.