def get_sandbox(self, task_id): """Returns the sandbox of the task, or None if it has not yet been initialized.""" try: for update in CheckpointDispatcher.iter_updates(self._runner_ckpt(task_id)): if update.runner_header and update.runner_header.sandbox: return update.runner_header.sandbox except CheckpointDispatcher.ErrorRecoveringState: return None