def discard_document_variables(app, env, docname):
    """Discard any document specific variables."""
    try:
        env.ipysphinx_widgets.discard(docname)
    except AttributeError:
        pass
    try:
        env.ipysphinx_created_from_nb.discard(docname)
    except AttributeError:
        pass
