code: def test_no_progress_bar(progress_bar, resources):
      opts, pm = make_opts_pm(
          progress_bar=progress_bar,
          input_file=(resources / "trivial.pdf"),
      )
      vd.check_options(opts, pm)
  
      pbar_disabled = None
  
      class CheckProgressBar(NullProgressBar):
          def __init__(self, disable, **kwargs):
              nonlocal pbar_disabled
              pbar_disabled = disable
              super().__init__(disable=disable, **kwargs)
  
      executor = SerialExecutor(pbar_class=CheckProgressBar)
      pdfinfo = PdfInfo(
          opts.input_file, progbar=opts.progress_bar, executor=executor
      )
  
      assert pdfinfo is not None
      assert pbar_disabled is not None and pbar_disabled != progress_bar
  
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 12 for calling a global function with example usage: test_no_progress_bar(progress_bar, resources) without return types