code: def test_metadata_fixup_warning(resources, outdir, caplog):
      _parser, options, _pm = get_parser_options_plugins(
          ["--output-type", "pdfa-2", "graph.pdf", "out.pdf"]
      )
  
      copyfile(resources / "graph.pdf", outdir / "graph.pdf")
  
      context = PdfContext(
          options,
          outdir,
          outdir / "graph.pdf",
          None,
          get_plugin_manager([]),
      )
      metadata_fixup(
          working_file=outdir / "graph.pdf",
          context=context,
          pdf_save_settings={},
      )
      for record in caplog.records:
          assert record.levelname != "WARNING", "Unexpected warning"
  
      # Now add some metadata that will not be copyable
      with pikepdf.open(outdir / "graph.pdf") as graph:
          with graph.open_metadata() as meta:
              meta["prism2:publicationName"] = "OCRmyPDF Test"
          graph.save(outdir / "graph_mod.pdf")
  
      context = PdfContext(
          options,
          outdir,
          outdir / "graph_mod.pdf",
          None,
          get_plugin_manager([]),
      )
      metadata_fixup(
          working_file=outdir / "graph.pdf",
          context=context,
          pdf_save_settings={},
      )
      assert any(
          record.levelname == "WARNING" for record in caplog.records
      )
  
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 11 for calling a global function with example usage: test_metadata_fixup_warning(resources, outdir, caplog) without return types