def purge_needs(app, env, docname):
if not hasattr(env, '<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>env.needs_all_needs = {key: need for key, need in env.needs_all_needs.items() if need['<STR_LIT>'] != docname}<EOL>
Gets executed, if a doc file needs to be purged/ read in again.
So this code delete all found needs for the given docname.