def METHOD_NAME(app, env, docname):
    if not hasattr(env, 'all_gallery_overview'):
        return
    env.all_gallery_overview = [
        xref for xref in env.all_gallery_overview if xref['docname'] != docname
    ]