code: def select_renderer(self, request, renderers, format_suffix=None):
          
          # Allow URL style format override.  eg. "?format=json
          format_query_param = self.settings.URL_FORMAT_OVERRIDE
          format = format_suffix or request.query_params.get(format_query_param)
  
          if format:
              renderers = self.filter_renderers(renderers, format)
  
          accepts = self.get_accept_list(request)
  
          # Check the acceptable media types against each renderer,
          # attempting more specific media types first
          # NB. The inner loop here isn't as bad as it first looks :)
          #     Worst case is we're looping over len(accept_list) * len(self.renderers)
          for media_type_set in order_by_precedence(accepts):
              for renderer in renderers:
                  for media_type in media_type_set:
                      if media_type_matches(renderer.media_type, media_type):
                          # Return the most specific media type as accepted.
                          media_type_wrapper = _MediaType(media_type)
                          if (
                              _MediaType(renderer.media_type).precedence >
                              media_type_wrapper.precedence
                          ):
                              # Eg client requests '*/*'
                              # Accepted media type is 'application/json'
                              full_media_type = ';'.join(
                                  (renderer.media_type,) +
                                  tuple('{0}={1}'.format(
                                      key, value.decode(HTTP_HEADER_ENCODING))
                                      for key, value in media_type_wrapper.params.items()))
                              return renderer, full_media_type
                          else:
                              # Eg client requests 'application/json; indent=8'
                              # Accepted media type is 'application/json; indent=8'
                              return renderer, media_type
  
          raise exceptions.NotAcceptable(available_renderers=renderers)
docs: Given a request and a list of renderers, return a two-tuple of:
          (renderer, media type).