async def METHOD_NAME(self, pid: int, exit_code: int):
    if pid not in self._workers:
        # If this worker didn't belong to this pool, ignore
        return
    worker = self._workers[pid]
    logger.warning(
        f"Worker with PID {worker.pid} on {self.name} stopped "
        f"unexpectedly with exit code {exit_code}. "
        "Triggering worker restart..."
    )
    self._dispatcher.METHOD_NAME(worker, exit_code)
    if pid in self._workers:
        # NOTE: worker may be removed by dispatcher
        del self._workers[pid]
    # Call attached on_worker_stop hooks
    await asyncio.gather(*[callback(worker) for callback in self._on_worker_stop])
    # Start a new worker
    await self._start_worker()