code: def report_output_file_size(
      options: Namespace,
      input_file: Path,
      output_file: Path,
      optimize_messages: Sequence[str] | None = None,
      file_overhead: int = 4000,
      page_overhead: int = 3000,
  ) -> None:
      if optimize_messages is None:
          optimize_messages = []
      try:
          output_size = Path(output_file).stat().st_size
          input_size = Path(input_file).stat().st_size
      except FileNotFoundError:
          return  # Outputting to stream or something
      with pikepdf.open(output_file) as p:
          # Overhead constants obtained by estimating amount of data added by OCR
          # PDF/A conversion, and possible XMP metadata addition, with compression
          reasonable_overhead = file_overhead + page_overhead * len(
              p.pages
          )
      ratio = output_size / input_size
      reasonable_ratio = output_size / (
          input_size + reasonable_overhead
      )
      if reasonable_ratio < 1.35 or input_size < 25000:
          return  # Seems fine
  
      reasons = []
      image_preproc = {
          "deskew",
          "clean_final",
          "remove_background",
          "oversample",
          "force_ocr",
      }
      for arg in image_preproc:
          if getattr(options, arg, False):
              reasons.append(
                  f"--{arg.replace('_', '-')} was issued, causing transcoding."
              )
  
      reasons.extend(optimize_messages)
  
      if options.output_type.startswith("pdfa"):
          reasons.append(
              "PDF/A conversion was enabled. (Try `--output-type pdf`.)"
          )
      if options.plugins:
          reasons.append("Plugins were used.")
  
      if reasons:
          explanation = (
              "Possible reasons for this include:\n"
              + "\n".join(reasons)
              + "\n"
          )
      else:
          explanation = "No reason for this increase is known.  Please report this issue."
  
      log.warning(
          f"The output file size is {ratio:.2f}× larger than the input file.\n"
          f"{explanation}"
      )
  
imports: from __future__ import annotations
  import locale
  import logging
  import os
  import sys
  import unicodedata
  from argparse import Namespace
  from collections.abc import Sequence
  from pathlib import Path
  from shutil import copyfileobj
  import pikepdf
  import PIL
  from pluggy import PluginManager
  from ocrmypdf._exec import unpaper
  from ocrmypdf.exceptions import BadArgsError, InputFileError, MissingDependencyError, OutputFileAccessError
  from ocrmypdf.helpers import is_file_writable, monotonic, safe_symlink
  from ocrmypdf.subprocess import check_external_program
label_desc: Use image node_id 18 for calling a global function with example usage: report_output_file_size(options, input_file, output_file, optimize_messages, file_overhead, page_overhead) without return types