code: def test_hocr_api_multipage(
      resources: Path, outdir: Path, outpdf: Path
  ):
      ocrmypdf.api._pdf_to_hocr(
          resources / "multipage.pdf",
          outdir,
          language="eng",
          skip_text=True,
          plugins=["tests/plugins/tesseract_cache.py"],
      )
      assert (outdir / "000001_ocr_hocr.hocr").exists()
      assert (outdir / "000006_ocr_hocr.hocr").exists()
      assert not (outdir / "000004_ocr_hocr.hocr").exists()
  
      ocrmypdf.api._hocr_to_ocr_pdf(outdir, outpdf)
      assert outpdf.exists()
  
file_path: OCRmyPDF/tests/test_api.py
imports: from __future__ import annotations
  from io import BytesIO
  from pathlib import Path
  import pytest
  from pdfminer.high_level import extract_text
  import ocrmypdf
  import ocrmypdf.api
label_desc: Use image node_id 3 for calling a global function with example usage: test_hocr_api_multipage(resources, outdir, outpdf) without return types