code: def test_write_multiframe(
      test_images, tmp_path, im_npy, im_out, im_comp
  ):
      # the base image as numpy array
      im = np.load(test_images / im_npy)
      # written with imageio
      iio_file = tmp_path / im_out
      iio.imwrite(iio_file, im, plugin="pillow")
  
      # written with pillow directly
      pil_file = tmp_path / im_comp
      pil_images = [Image.fromarray(frame) for frame in im]
      pil_images[0].save(
          pil_file, save_all=True, append_images=pil_images[1:]
      )
  
      # file exists
      assert os.path.exists(iio_file)
  
      # imageio content matches pillow content
      assert iio_file.read_bytes() == pil_file.read_bytes()
  
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 2 for calling a global function with example usage: test_write_multiframe(test_images, tmp_path, im_npy, im_out, im_comp) without return types