code: def test_version_comparison():
      vd.check_external_program(
          program="dummy_basic",
          package="dummy",
          version_checker=make_version("9.0"),
          need_version="8.0.2",
      )
      vd.check_external_program(
          program="dummy_doubledigit",
          package="dummy",
          version_checker=make_version("10.0"),
          need_version="8.0.2",
      )
      with pytest.raises(MissingDependencyError):
          vd.check_external_program(
              program="tesseract",
              package="tesseract",
              version_checker=make_version("4.0.0-beta.1"),
              need_version="4.1.1",
              version_parser=TesseractVersion,
          )
      vd.check_external_program(
          program="tesseract",
          package="tesseract",
          version_checker=make_version("v5.0.0-alpha.20200201"),
          need_version="4.1.1",
          version_parser=TesseractVersion,
      )
      vd.check_external_program(
          program="tesseract",
          package="tesseract",
          version_checker=make_version("5.0.0-rc1.20211030"),
          need_version="4.1.1",
          version_parser=TesseractVersion,
      )
      vd.check_external_program(
          program="tesseract",
          package="tesseract",
          version_checker=make_version(
              "v4.1.1.20181030"
          ),  # Used in some Windows builds
          need_version="4.1.1",
          version_parser=TesseractVersion,
      )
      vd.check_external_program(
          program="gs",
          package="ghostscript",
          version_checker=make_version("10.0"),
          need_version="9.50",
      )
      with pytest.raises(MissingDependencyError):
          vd.check_external_program(
              program="tesseract",
              package="tesseract",
              version_checker=make_version("4.1.1-rc2-25-g9707"),
              need_version="4.1.1",
              version_parser=TesseractVersion,
          )
      with pytest.raises(MissingDependencyError):
          vd.check_external_program(
              program="dummy_fails",
              package="dummy",
              version_checker=make_version("1.0"),
              need_version="2.0",
          )
  
imports: from __future__ import annotations
  import logging
  import os
  from unittest.mock import patch
  import pikepdf
  import pytest
  from ocrmypdf import _validation
  from ocrmypdf._concurrent import NullProgressBar, SerialExecutor
  from ocrmypdf._exec.tesseract import TesseractVersion
  from ocrmypdf._plugin_manager import get_plugin_manager
  from ocrmypdf.api import create_options
  from ocrmypdf.cli import get_parser
  from ocrmypdf.exceptions import BadArgsError, MissingDependencyError
  from ocrmypdf.pdfinfo import PdfInfo
  from .conftest import run_ocrmypdf_api
label_desc: Use image node_id 15 for calling a global function with example usage: test_version_comparison() without return types