def remove_download_token_from_cookie(options, response):
    """
        Removes a download token in cookie as an indicator that download is ready.

        Args:
            options (dict): args or form fields from Request object
            response: Response object

        Returns:
            The response object that is passed in
    """
    cookie_key = options.get('downloadCookieKey', '')
    cookie_path = options.get('downloadCookiePath', '/')

    if cookie_key != '':
        response.set_cookie(cookie_key, expires=0, path=cookie_path)

    return response