<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deleted(self, src, path):
 """Update the reference tree when a handled file is deleted."""

        if self.parents[path] is not None:
            for parent in self.parents[path]:
                self.children[parent].remove(path)
                if not self.children[parent]:
                    del self.children[parent]
        del self.parents[path]