code: def test_ghostscript_mandatory_color_conversion(resources, outpdf):
      with pytest.raises(ColorConversionNeededError):
          check_ocrmypdf(
              resources / "jbig2_baddevicen.pdf",
              outpdf,
              "--plugin",
              "tests/plugins/tesseract_noop.py",
          )
  
imports: from __future__ import annotations
  import logging
  import secrets
  import subprocess
  from decimal import Decimal
  from unittest.mock import patch
  import pikepdf
  import pytest
  from PIL import Image, UnidentifiedImageError
  from ocrmypdf._exec.ghostscript import DuplicateFilter, rasterize_pdf
  from ocrmypdf.exceptions import ColorConversionNeededError, ExitCode
  from ocrmypdf.helpers import Resolution
  from .conftest import check_ocrmypdf, run_ocrmypdf_api
label_desc: Use image node_id 8 for calling a global function with example usage: test_ghostscript_mandatory_color_conversion(resources, outpdf) without return types