code: def test_writer_pixelformat_size_verbose(tmpdir):
      # Check that video pixel format and size get written as expected.
  
      # Make sure verbose option works and that default pixelformat is yuv420p
      tmpf = tmpdir.join("test.mp4")
      W = iio.get_writer(str(tmpf), ffmpeg_log_level="warning")
      nframes = 4  # Number of frames in video
      for i in range(nframes):
          # Use size divisible by 16 or it gets changed.
          W.append_data(np.zeros((64, 64, 3), np.uint8))
      W.close()
  
      # Check that video is correct size & default output video pixel format
      # is correct
      W = iio.get_reader(str(tmpf))
      assert W.count_frames() == nframes
      assert W._meta["size"] == (64, 64)
      assert W._meta["pix_fmt"] in ("yuv420p", "yuv420p(progressive)")
  
      # Now check that macroblock size gets turned off if requested
      W = iio.get_writer(
          str(tmpf), macro_block_size=1, ffmpeg_log_level="warning"
      )
      for i in range(nframes):
          W.append_data(np.zeros((100, 106, 3), np.uint8))
      W.close()
      W = iio.get_reader(str(tmpf))
      assert W.count_frames() == nframes
      assert W._meta["size"] == (106, 100)
      assert W._meta["pix_fmt"] in ("yuv420p", "yuv420p(progressive)")
  
      # Now double check values different than default work
      W = iio.get_writer(
          str(tmpf), macro_block_size=4, ffmpeg_log_level="warning"
      )
      for i in range(nframes):
          W.append_data(np.zeros((64, 65, 3), np.uint8))
      W.close()
      W = iio.get_reader(str(tmpf))
      assert W.count_frames() == nframes
      assert W._meta["size"] == (68, 64)
      assert W._meta["pix_fmt"] in ("yuv420p", "yuv420p(progressive)")
  
      # Now check that the macroblock works as expected for the default of 16
      W = iio.get_writer(str(tmpf), ffmpeg_log_level="debug")
      for i in range(nframes):
          W.append_data(np.zeros((111, 140, 3), np.uint8))
      W.close()
      W = iio.get_reader(str(tmpf))
      assert W.count_frames() == nframes
      # Check for warning message with macroblock
      assert W._meta["size"] == (144, 112)
      assert W._meta["pix_fmt"] in ("yuv420p", "yuv420p(progressive)")
  
imports: import gc
  import os
  import platform
  import sys
  import threading
  import time
  import warnings
  from io import BytesIO
  from pathlib import Path
  import imageio.plugins
  import imageio.v2
  import imageio.v3
  import numpy
  import pytest
  from imageio import core
  from imageio.core import IS_PYPY
  from conftest import deprecated_test
label_desc: Use image node_id 15 for calling a global function with example usage: test_writer_pixelformat_size_verbose(tmpdir) without return types