def METHOD_NAME(self, docname):
    remove = []
    for key, (fn, _) in self.data["objects"].items():
        if fn == docname:
            remove.append(key)
    for key in remove:
        del self.data["objects"][key]