def make_response(self, data, *args, **kwargs):
default_mediatype = kwargs.pop('<STR_LIT>', None) or self.default_mediatype<EOL>mediatype = request.accept_mimetypes.best_match(<EOL>self.representations,<EOL>default=default_mediatype,<EOL>)<EOL>if mediatype is None:<EOL><INDENT>raise NotAcceptable()<EOL><DEDENT>if mediatype in self.representations:<EOL><INDENT>resp = self.representations[mediatype](data, *args, **kwargs)<EOL>resp.headers['<STR_LIT:Content-Type>'] = mediatype<EOL>return resp<EOL><DEDENT>elif mediatype == '<STR_LIT>':<EOL><INDENT>resp = original_flask_make_response(str(data), *args, **kwargs)<EOL>resp.headers['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>return resp<EOL><DEDENT>else:<EOL><INDENT>raise InternalServerError()<EOL><DEDENT>
Looks up the representation transformer for the requested media
        type, invoking the transformer to create a response object. This
        defaults to default_mediatype if no transformer is found for the
        requested mediatype. If default_mediatype is None, a 406 Not
        Acceptable response will be sent as per RFC 2616 section 14.1

        :param data: Python object containing response data to be transformed