code: def test_FramesMatches_write_gifs(util):
      video_clip = VideoFileClip("media/chaplin.mp4").subclip(0, 0.2)
      clip = concatenate_videoclips(
          [video_clip.fx(time_mirror), video_clip]
      )
  
      # add matching frame starting at start < clip.start which should be ignored
      matching_frames = FramesMatches.from_clip(
          clip, 10, 3, logger=None
      )
      matching_frames.insert(0, FramesMatch(-1, -0.5, 0, 0))
      matching_frames = matching_frames.select_scenes(
          1,
          0.01,
          nomatch_threshold=0,
      )
  
      gifs_dir = os.path.join(
          util.TMP_DIR, "moviepy_FramesMatches_write_gifs"
      )
      if os.path.isdir(gifs_dir):
          shutil.rmtree(gifs_dir)
      os.mkdir(gifs_dir)
      assert os.path.isdir(gifs_dir)
  
      matching_frames.write_gifs(clip, gifs_dir, logger=None)
  
      gifs_filenames = os.listdir(gifs_dir)
      assert len(gifs_filenames) == 7
  
      for filename in gifs_filenames:
          filepath = os.path.join(gifs_dir, filename)
          assert os.path.isfile(filepath)
  
          with open(filepath, "rb") as f:
              assert len(f.readline())
  
          end, start = filename.split(".")[0].split("_")
          end, start = (int(end), int(start))
          assert isinstance(end, int)
          assert isinstance(end, int)
  
      try:
          shutil.rmtree(gifs_dir)
      except PermissionError:
          pass
  
imports: import importlib
  import math
  import os
  import shutil
  import sys
  import numpy
  import pytest
  from moviepy.audio.AudioClip import AudioClip, CompositeAudioClip
  from moviepy.audio.fx.multiply_volume import multiply_volume
  from moviepy.audio.tools.cuts import find_audio_period
  from moviepy.video.compositing.concatenate import concatenate_videoclips
  from moviepy.video.fx.loop import loop
  from moviepy.video.fx.time_mirror import time_mirror
  from moviepy.video.io.VideoFileClip import VideoFileClip
  from moviepy.video.tools.credits import CreditsClip
  from moviepy.video.tools.cuts import FramesMatch, FramesMatches, detect_scenes, find_video_period
  from moviepy.video.tools.drawing import circle, color_gradient, color_split
  from moviepy.video.tools.interpolators import Interpolator, Trajectory
  from moviepy.video.VideoClip import BitmapClip, ColorClip, ImageClip, VideoClip
label_desc: Use image node_id 9 for calling a global function with example usage: test_FramesMatches_write_gifs(util) without return types