code: def test_report_file_size(tmp_path, caplog):
      logging.getLogger("pikepdf._qpdf").setLevel(
          logging.CRITICAL
      )  # Suppress logging
  
      in_ = tmp_path / "a.pdf"
      out = tmp_path / "b.pdf"
      pdf = pikepdf.new()
      pdf.save(in_)
      pdf.save(out)
      opts = make_opts(output_type="pdf")
      vd.report_output_file_size(opts, in_, out)
      assert caplog.text == ""
      caplog.clear()
  
      waste_of_space = b"Dummy" * 5000
      pdf.Root.Dummy = waste_of_space
      pdf.save(in_)
      pdf.Root.Dummy2 = waste_of_space + waste_of_space
      pdf.save(out)
  
      vd.report_output_file_size(
          opts, in_, out, ["The optional dependency..."]
      )
      assert "optional dependency" in caplog.text
      caplog.clear()
  
      vd.report_output_file_size(opts, in_, out, [])
      assert "No reason" in caplog.text
      caplog.clear()
  
      opts = make_opts(in_, out, optimize=0, output_type="pdf")
      vd.report_output_file_size(
          opts, in_, out, ["Optimization was disabled."]
      )
      assert "disabled" in caplog.text
      caplog.clear()
  
imports: from __future__ import annotations
  import logging
  import os
  from unittest.mock import patch
  import pikepdf
  import pytest
  from ocrmypdf import _validation
  from ocrmypdf._concurrent import NullProgressBar, SerialExecutor
  from ocrmypdf._exec.tesseract import TesseractVersion
  from ocrmypdf._plugin_manager import get_plugin_manager
  from ocrmypdf.api import create_options
  from ocrmypdf.cli import get_parser
  from ocrmypdf.exceptions import BadArgsError, MissingDependencyError
  from ocrmypdf.pdfinfo import PdfInfo
  from .conftest import run_ocrmypdf_api
label_desc: Use image node_id 10 for calling a global function with example usage: test_report_file_size(tmp_path, caplog) without return types