code: def _unset_empty_metadata(meta: PdfMetadata, options):
      """Unset metadata fields that were explicitly set to empty strings.
  
      If the user explicitly specified an empty string for any of the
      following, they should be unset and not reported as missing in
      the output pdf. Note that some metadata fields use differing names
      between PDF/A and PDF.
      """
      if options.title == "" and "dc:title" in meta:
          del meta["dc:title"]  # PDF/A and PDF
      if options.author == "":
          if "dc:creator" in meta:
              del meta["dc:creator"]  # PDF/A (Not xmp:CreatorTool)
          if "pdf:Author" in meta:
              del meta["pdf:Author"]  # PDF
      if options.subject == "":
          if "dc:description" in meta:
              del meta["dc:description"]  # PDF/A
          if "dc:subject" in meta:
              del meta["dc:subject"]  # PDF
      if options.keywords == "" and "pdf:Keywords" in meta:
          del meta["pdf:Keywords"]
  
imports: from __future__ import annotations
  import logging
  import os
  from datetime import datetime, timezone
  from pathlib import Path
  from typing import Any
  from pikepdf import Dictionary, Name, Pdf
  from pikepdf import __version__
  from pikepdf.models.metadata import PdfMetadata, encode_pdf_date
  from ocrmypdf._jobcontext import PdfContext
  from ocrmypdf._version import PROGRAM_NAME
  from ocrmypdf._version import __version__
  from ocrmypdf.languages import iso_639_2_from_3
label_desc: Use image node_id 6 for calling a global function with example usage: _unset_empty_metadata(meta, options) without return types