'Given a list of parsers and a media type, return the appropriate
parser to handle the incoming request.'

def select_parser(self, request, parsers):

    for parser in parsers:
        if media_type_matches(parser.media_type, request.content_type):
            return parser
    return None
