code: def test_stream_api(resources: Path):
      in_ = (resources / "graph.pdf").open("rb")
      out = BytesIO()
  
      ocrmypdf.ocr(in_, out, tesseract_timeout=0.0)
      out.seek(0)
      assert b"%PDF" in out.read(1024)
  
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 2 for calling a global function with example usage: test_stream_api(resources) without return types