class_docstr: Implements a purely sequential executor using the parallel protocol.
  
  The current process/thread will be the worker that executes all tasks
  in order. As such, ``worker_initializer`` will never be called.
class_docstr_tok: ["Implements","a","purely","sequential","executor","using","the","parallel","protocol",".","The","current","process\/thread","will","be","the","worker","that","executes","all","tasks","in","order",".","As","such",",","``","worker_initializer","``","will","never","be","called","."]
code: def _execute(
      self,
      *,
      use_threads: bool,
      max_workers: int,
      progress_kwargs: dict,
      worker_initializer: Callable,
      task: Callable,
      task_arguments: Iterable,
      task_finished: Callable,
  ):  # pylint: disable=unused-argument
      with self.pbar_class(**progress_kwargs) as pbar:
          for args in task_arguments:
              result = task(*args)
              task_finished(result, pbar)
  
file_path: OCRmyPDF/src/ocrmypdf/_concurrent.py
imports: from __future__ import annotations
  import threading
  from abc import ABC, abstractmethod
  from collections.abc import Iterable
  from typing import Any, Callable, TypeVar
  from ocrmypdf._progressbar import NullProgressBar, ProgressBar
label_desc: Use image node_id 1 for calling the SerialExecutor obj's underlying member method code with example usage: obj._execute() without return types