code: def test_creation_date_preserved(
      output_type, resources, infile, outpdf
  ):
      input_file = resources / infile
  
      check_ocrmypdf(
          input_file,
          outpdf,
          "--output-type",
          output_type,
          "--plugin",
          "tests/plugins/tesseract_noop.py",
      )
  
      with pikepdf.open(input_file) as pdf_before, pikepdf.open(
          outpdf
      ) as pdf_after:
          before = pdf_before.trailer.get("/Info", {})
          after = pdf_after.trailer.get("/Info", {})
  
          if not before:
              assert after.get("/CreationDate", "") != ""
          else:
              # We expect that the creation date stayed the same
              date_before = decode_pdf_date(
                  str(before["/CreationDate"])
              )
              date_after = decode_pdf_date(str(after["/CreationDate"]))
              assert (
                  seconds_between_dates(date_before, date_after) < 1000
              )
  
          # We expect that the modified date is quite recent
          date_after = decode_pdf_date(str(after["/ModDate"]))
          assert (
              seconds_between_dates(
                  date_after, datetime.datetime.now(timezone.utc)
              )
              < 1000
          )
  
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 7 for calling a global function with example usage: test_creation_date_preserved(output_type, resources, infile, outpdf) without return types