code: def check_ocrmypdf(
      input_file: Path, output_file: Path, *args
  ) -> Path:
      """Run ocrmypdf and confirm that a valid plausible PDF was created."""
      api_args = [str(input_file), str(output_file)] + [
          str(arg) for arg in args if arg is not None
      ]
  
      _parser, options, plugin_manager = get_parser_options_plugins(
          args=api_args
      )
      api.check_options(options, plugin_manager)
      result = api.run_pipeline(options, plugin_manager=plugin_manager)
  
      assert result == 0
      assert output_file.exists(), "Output file not created"
      assert output_file.stat().st_size > 100, "PDF too small or empty"
  
      return output_file
  
imports: from __future__ import annotations
  import platform
  import sys
  from pathlib import Path
  from subprocess import CompletedProcess, run
  import pytest
  from ocrmypdf import api, pdfinfo
  from ocrmypdf._exec import unpaper
  from ocrmypdf._plugin_manager import get_parser_options_plugins
  from ocrmypdf.exceptions import ExitCode
label_desc: Use image node_id 12 for calling a global function with example usage: check_ocrmypdf(input_file, output_file) and returns: output_file