Choose serializer for a given request based on query arg or headers.

        Checks if query arg `format` (by default) is present and tries to match
        the serializer based on the arg value, by resolving the mimetype mapped
        to the arg value.
        Otherwise, chooses the serializer by retrieving the best quality
        `Accept` headers and matching its value (mimetype).

        :param serializers: Dictionary of serializers.
        :param default_media_type: The default media type.
        :returns: Best matching serializer based on `format` query arg first,
            then client `Accept` headers or None if no matching serializer.

def match_serializers(self, serializers, default_media_type):
        """Choose serializer for a given request based on query arg or headers.

        Checks if query arg `format` (by default) is present and tries to match
        the serializer based on the arg value, by resolving the mimetype mapped
        to the arg value.
        Otherwise, chooses the serializer by retrieving the best quality
        `Accept` headers and matching its value (mimetype).

        :param serializers: Dictionary of serializers.
        :param default_media_type: The default media type.
        :returns: Best matching serializer based on `format` query arg first,
            then client `Accept` headers or None if no matching serializer.
        """
        return self._match_serializers_by_query_arg(serializers) or self.\
            _match_serializers_by_accept_headers(serializers,
                                                 default_media_type)