Creates a Flask response object from the specified data.
        The appropriated encoder is taken based on the request header Accept.
        If there is not data to be serialized the response status code is 204.

        :param data: The Python object to be serialized.
        :return: A Flask response object.

def __make_response(self, data, default_renderer=None):
        """
        Creates a Flask response object from the specified data.
        The appropriated encoder is taken based on the request header Accept.
        If there is not data to be serialized the response status code is 204.

        :param data: The Python object to be serialized.
        :return: A Flask response object.
        """

        status = headers = None
        if isinstance(data, tuple):
            data, status, headers = unpack(data)

        if data is None:
            data = self.__app.response_class(status=204)
        elif not isinstance(data, self.__app.response_class):
            renderer, mimetype = self.content_negotiation.select_renderer(request, self.default_renderers)

            if not renderer:
                if not default_renderer:
                    raise NotAcceptable()

                renderer = default_renderer
                mimetype = default_renderer.mimetype

            data_bytes = renderer.render(data, mimetype)
            data = self.__app.response_class(data_bytes, mimetype=str(mimetype))

        if status is not None:
            data.status_code = status

        if headers:
            data.headers.extend(headers)

        return data