code: def detach_all(self):
          
          self.detach_all_classes()
          self.objects.clear()
          self.index.clear()
          self._keepalive[:] = []
docs: Detach from all tracked classes and objects.
          Restore the original constructors and cleanse the tracking lists.