code: def test_userunit_pdf_passes(mode, poster, outpdf):
      before = PdfInfo(poster)
      check_ocrmypdf(
          poster,
          outpdf,
          f"--output-type={mode}",
          "--plugin",
          "tests/plugins/tesseract_cache.py",
      )
  
      after = PdfInfo(outpdf)
      assert isclose(before[0].width_inches, after[0].width_inches)
  
file_path: OCRmyPDF/tests/test_userunit.py
imports: from __future__ import annotations
  from math import isclose
  import pytest
  from ocrmypdf.exceptions import ExitCode
  from ocrmypdf.pdfinfo import PdfInfo
  from .conftest import check_ocrmypdf, run_ocrmypdf_api
label_desc: Use image node_id 2 for calling a global function with example usage: test_userunit_pdf_passes(mode, poster, outpdf) without return types