code: def test_bookmarks_preserved(
      output_type, ocr_option, resources, outpdf
  ):
      fitz = pytest.importorskip("fitz")
      input_file = resources / "toc.pdf"
      before_toc = fitz.Document(str(input_file)).get_toc()
  
      check_ocrmypdf(
          input_file,
          outpdf,
          ocr_option,
          "--output-type",
          output_type,
          "--plugin",
          "tests/plugins/tesseract_noop.py",
      )
  
      after_toc = fitz.Document(str(outpdf)).get_toc()
      print(before_toc)
      print(after_toc)
      assert before_toc == after_toc
  
imports: from __future__ import annotations
  import datetime
  import warnings
  from datetime import timezone
  from shutil import copyfile
  import pikepdf
  import pytest
  from packaging.version import Version
  from pikepdf.models.metadata import decode_pdf_date
  from ocrmypdf._exec import ghostscript
  from ocrmypdf._jobcontext import PdfContext
  from ocrmypdf._metadata import metadata_fixup
  from ocrmypdf._pipeline import convert_to_pdfa
  from ocrmypdf._plugin_manager import get_parser_options_plugins, get_plugin_manager
  from ocrmypdf.exceptions import ExitCode
  from ocrmypdf.pdfa import file_claims_pdfa, generate_pdfa_ps
  from ocrmypdf.pdfinfo import PdfInfo
  from .conftest import check_ocrmypdf, run_ocrmypdf, run_ocrmypdf_api
label_desc: Use image node_id 5 for calling a global function with example usage: test_bookmarks_preserved(output_type, ocr_option, resources, outpdf) without return types