code: def validate(pdfinfo: PdfInfo, options: Namespace) -> None:
      """Called to give a plugin an opportunity to review *options* and *pdfinfo*.
  
      *options* contains the "work order" to process a particular file. *pdfinfo*
      contains information about the input file obtained after loading and
      parsing. The plugin may modify the *options*. For example, you could decide
      that a certain type of file should be treated with ``options.force_ocr = True``
      based on information in its *pdfinfo*.
  
      Raises:
          ocrmypdf.exceptions.ExitCodeException: If options or pdfinfo are not acceptable
              and the application should terminate gracefully with an informative
              message and error code.
  
      Note:
          This hook will be called from the main process, and may modify global state
          before child worker processes are forked.
      """
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from argparse import ArgumentParser, Namespace
  from collections.abc import Sequence, Set
  from logging import Handler
  from pathlib import Path
  from typing import TYPE_CHECKING, NamedTuple
  import pluggy
  from ocrmypdf import Executor, PdfContext
  from ocrmypdf._progressbar import ProgressBar
  from ocrmypdf.helpers import Resolution
label_desc: Use image node_id 7 for calling a global function with example usage: validate(pdfinfo, options) without return types