class_docstr: A class representing an OCR engine with capabilities similar to Tesseract OCR.
  
  This could be used to create a plugin for another OCR engine instead of
  Tesseract OCR.
docstr: Called to produce a hOCR file from a page image and sidecar text file.
  
  A hOCR file is an HTML-like file that describes the position of text on a
  page. OCRmyPDF can create a text only PDF from the hOCR file and graft it
  onto the output PDF.
  
  This function executes in a worker thread or worker process. OCRmyPDF
  automatically parallelizes OCR over pages. The OCR engine should not
  introduce more parallelism.
  
  Args:
      input_file: A page image on which to perform OCR.
      output_hocr: The expected name of the output hOCR file.
      output_text: The expected name of a text file containing the
          recognized text.
      options: The command line options.
code: def generate_hocr(
      input_file: Path,
      output_hocr: Path,
      output_text: Path,
      options: Namespace,
  ) -> None:
      """Called to produce a hOCR file from a page image and sidecar text file.
  
      A hOCR file is an HTML-like file that describes the position of text on a
      page. OCRmyPDF can create a text only PDF from the hOCR file and graft it
      onto the output PDF.
  
      This function executes in a worker thread or worker process. OCRmyPDF
      automatically parallelizes OCR over pages. The OCR engine should not
      introduce more parallelism.
  
      Args:
          input_file: A page image on which to perform OCR.
          output_hocr: The expected name of the output hOCR file.
          output_text: The expected name of a text file containing the
              recognized text.
          options: The command line options.
      """
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from argparse import ArgumentParser, Namespace
  from collections.abc import Sequence, Set
  from logging import Handler
  from pathlib import Path
  from typing import TYPE_CHECKING, NamedTuple
  import pluggy
  from ocrmypdf import Executor, PdfContext
  from ocrmypdf._progressbar import ProgressBar
  from ocrmypdf.helpers import Resolution
label_desc: Use image node_id 7 for calling the OcrEngine obj's underlying member method code with example usage: obj.generate_hocr(input_file, output_hocr, output_text, options) without return types