code: def test_save(tmp_path, mode):
      helper_save_as_pdf(tmp_path, mode)
  
imports: from __future__ import annotations
  import io
  import os
  import os.path
  import tempfile
  import time
  import pytest
  from PIL import Image, PdfParser, features
  from .helper import hopper, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 2 for calling a global function with example usage: test_save(tmp_path, mode) without return types