code: def _clear(self) -> None:
          
          for _, event, _, _ in self.events():
              if hasattr(event, "__self__") and isinstance(event.__self__, Process):  # type: ignore
                  event.__self__.throw()                                              # type: ignore
          self._events.clear()
          self._ts_now = 0.0
docs: Resets the internal state of the simulator, and sets the simulated clock back to 0.0. This discards all
          outstanding events and tears down hanging process instances.