code: def test_png_16bit(test_images, tmp_path):
      im = np.load(test_images / "chelsea.npy")[..., 0]
      iio.imwrite(
          tmp_path / "1.png",
          2 * im.astype(np.uint16),
          plugin="pillow",
          mode="I;16",
      )
      iio.imwrite(tmp_path / "2.png", im, plugin="pillow", mode="L")
  
      size_1 = os.stat(tmp_path / "1.png").st_size
      size_2 = os.stat(tmp_path / "2.png").st_size
      assert size_2 < size_1
  
      im2 = iio.imread(tmp_path / "2.png", plugin="pillow")
      assert im2.dtype == np.uint8
  
      if PILLOW_VERSION >= (10, 0, 0):
          im3 = iio.imread(tmp_path / "1.png", plugin="pillow")
          assert im3.dtype == np.uint16
      else:
          # legacy behavior for pillow < v10.0.0
          with pytest.warns(UserWarning):
              im3 = iio.imread(tmp_path / "1.png", plugin="pillow")
  
          assert im3.dtype == np.int32
  
imports: import io
  import os
  from pathlib import Path
  import imageio.v3
  import numpy
  import pytest
  from imageio.core.request import InitializationError, Request
  from imageio.core.v3_plugin_api import PluginV3
  from imageio.plugins.pillow import PillowPlugin
  from PIL import Image, ImageSequence, ImageOps, __version__
label_desc: Use image node_id 5 for calling a global function with example usage: test_png_16bit(test_images, tmp_path) without return types