code: def fail_if_stoponerror(args, **kwargs):
      if "-dPDFSTOPONERROR" in args:
          raise CalledProcessError(
              1, "gs", output=b"", stderr=b"PDF STOP ON ERROR"
          )
      return run_polling_stderr(args, **kwargs)
  
file_path: OCRmyPDF/tests/plugins/gs_render_soft_error.py
imports: from __future__ import annotations
  from pathlib import Path
  from subprocess import CalledProcessError
  from unittest.mock import patch
  from ocrmypdf import hookimpl
  from ocrmypdf.builtin_plugins import ghostscript
  from ocrmypdf.subprocess import run_polling_stderr
label_desc: Use image node_id 1 for calling a global function with example usage: fail_if_stoponerror(args) and returns: run_polling_stderr