def METHOD_NAME(self, checkpoint: DatasetShardCheckpoint):
    """Restore the task manager from a checkpoint"""
    self._dataset_splitter = StreamingDatasetSplitter.from_checkpoint(
        checkpoint.splitter
    )
    self.todo = []
    for shard_indices in checkpoint.doing + checkpoint.todo:
        shard = Shard(
            name=self._dataset_splitter.dataset_name,
            start=shard_indices[0],
            end=shard_indices[1],
        )
        self.todo.append(
            Task(
                self._dataset_splitter.dataset_name,
                self._task_type,
                shard,
            )
        )