code: def test_img2pdf_fails(resources, no_outpdf):
      with patch(
          "ocrmypdf._pipeline.img2pdf.convert",
          side_effect=img2pdf.ImageOpenError(),
      ) as mock:
          rc = run_ocrmypdf_api(
              resources / "baiona_gray.png",
              no_outpdf,
              "--image-dpi",
              "200",
          )
          assert rc == ocrmypdf.ExitCode.input_file
          mock.assert_called()
  
file_path: OCRmyPDF/tests/test_image_input.py
imports: from __future__ import annotations
  from unittest.mock import patch
  import img2pdf
  import pikepdf
  import pytest
  from PIL import Image
  import ocrmypdf
  from .conftest import check_ocrmypdf, run_ocrmypdf_api
label_desc: Use image node_id 6 for calling a global function with example usage: test_img2pdf_fails(resources, no_outpdf) without return types