<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detach_all(self):
 """ Detach from all tracked classes and objects. Restore the original constructors and cleanse the tracking lists. """

        self.detach_all_classes()
        self.objects.clear()
        self.index.clear()
        self._keepalive[:] = []