code: def test_multiple_writes(test_images):
      # Note: when opening videos via imopen prefer using the additional API for
      # writing (see eg. test_procedual_writing)
      out_buffer = io.BytesIO()
      with iio.imopen(
          out_buffer, "w", plugin="pyav", extension=".mp4"
      ) as file:
          for frame in iio.imiter(
              test_images / "newtonscradle.gif",
              plugin="pyav",
              format="rgba",
          ):
              file.write(
                  frame,
                  is_batch=False,
                  codec="libx264",
                  in_pixel_format="rgba",
              )
  
      actual = out_buffer.getvalue()
      assert actual is not None
  
imports: import io
  import warnings
  from contextlib import ExitStack
  from pathlib import Path
  import numpy
  import pytest
  from conftest import IS_PYPY
  import imageio.v3
  from av.video.format import names
  from imageio.plugins.pyav import _format_to_dtype
label_desc: Use image node_id 16 for calling a global function with example usage: test_multiple_writes(test_images) without return types