code: def check_options(options):
      """Check that the options are valid for this plugin."""
      check_external_program(
          program="gs",
          package="ghostscript",
          version_checker=ghostscript.version,
          need_version="9.54",  # RHEL 9's version; Ubuntu 22.04 has 9.55
      )
      gs_version = ghostscript.version()
      if gs_version in BLACKLISTED_GS_VERSIONS:
          raise MissingDependencyError(
              f"Ghostscript {gs_version} contains serious regressions and is not "
              "supported. Please upgrade to a newer version."
          )
      if Version("10.0.0") <= gs_version < Version("10.02.1") and (
          options.skip_text or options.redo_ocr
      ):
          raise MissingDependencyError(
              f"Ghostscript 10.0.0 through 10.02.0 (your version: {gs_version}) "
              "contain serious regressions that corrupt PDFs with existing text, "
              "such as those processed using --skip-text or --redo-ocr. "
              "Please upgrade to a "
              "newer version, or use --output-type pdf to avoid Ghostscript, or "
              "use --force-ocr to discard existing text."
          )
  
      if options.output_type == "pdfa":
          options.output_type = "pdfa-2"
      if (
          options.color_conversion_strategy
          not in ghostscript.COLOR_CONVERSION_STRATEGIES
      ):
          raise ValueError(
              f"Invalid color conversion strategy: {options.color_conversion_strategy}"
          )
      if (
          options.pdfa_image_compression != "auto"
          and not options.output_type.startswith("pdfa")
      ):
          log.warning(
              "--pdfa-image-compression argument only applies when "
              "--output-type is one of 'pdfa', 'pdfa-1', or 'pdfa-2'"
          )
  
file_path: OCRmyPDF/src/ocrmypdf/builtin_plugins/ghostscript.py
imports: from __future__ import annotations
  import logging
  from packaging.version import Version
  from ocrmypdf import hookimpl
  from ocrmypdf._exec import ghostscript
  from ocrmypdf.exceptions import MissingDependencyError
  from ocrmypdf.subprocess import check_external_program
label_desc: Use image node_id 2 for calling a global function with example usage: check_options(options) without return types