def generate_response(self, response):
        """ Serializes the response object and returns the
            raw form.
            :param response: A `pinky.core.response.Response`
                object
        """
        if not response:
            return self.__serializer__.dump({})

        return self.__serializer__.dump(response.to_dict())