code: def exec_pdf_to_hocr(context: PdfContext, executor: Executor) -> None:
      """Execute the OCR pipeline concurrently and output hOCR."""
      # Run exec_page_sync on every page
      options = context.options
      max_workers = min(len(context.pdfinfo), options.jobs)
      if max_workers > 1:
          log.info(
              "Start processing %d pages concurrently", max_workers
          )
  
      executor(
          use_threads=options.use_threads,
          max_workers=max_workers,
          progress_kwargs=dict(
              total=(2 * len(context.pdfinfo)),
              desc="hOCR",
              unit="page",
              unit_scale=0.5,
              disable=not options.progress_bar,
          ),
          worker_initializer=partial(
              worker_init, PIL.Image.MAX_IMAGE_PIXELS
          ),
          task=_exec_page_hocr_sync,
          task_arguments=context.get_page_context_args(),
      )
  
file_path: OCRmyPDF/src/ocrmypdf/_pipelines/pdf_to_hocr.py
imports: from __future__ import annotations
  import argparse
  import logging
  import logging.handlers
  import shutil
  from functools import partial
  import PIL
  from ocrmypdf._concurrent import Executor
  from ocrmypdf._jobcontext import PageContext, PdfContext
  from ocrmypdf._pipeline import get_pdfinfo, is_ocr_required, ocr_engine_hocr, validate_pdfinfo_options
  from ocrmypdf._pipelines._common import HOCRResult, manage_work_folder, process_page, set_thread_pageno, setup_pipeline, worker_init
  from ocrmypdf._plugin_manager import OcrmypdfPluginManager
  from ocrmypdf._validation import set_lossless_reconstruction
label_desc: Use image node_id 2 for calling a global function with example usage: exec_pdf_to_hocr(context, executor) without return types