code: def slide_out(clip, duration, side):
      """Makes the clip go away by one side of the screen.
  
      Only works when the clip is included in a CompositeVideoClip,
      and if the clip has the same size as the whole composition.
  
      Parameters
      ----------
  
      clip : moviepy.Clip.Clip
        A video clip.
  
      duration : float
        Time taken for the clip to fully disappear.
  
      side : str
        Side of the screen where the clip goes. One of
        'top', 'bottom', 'left' or 'right'.
  
      Examples
      --------
  
      >>> clips = [... make a list of clips]
      >>> slided_clips = [
      ...     CompositeVideoClip([clip.fx(transfx.slide_out, 1, "left")])
      ...     for clip in clips
      ... ]
      >>> final_clip = concatenate_videoclips(slided_clips, padding=-1)
      >>>
      >>> clip = ColorClip(
      ...     color=(255, 0, 0), duration=1, size=(300, 300)
      ... ).with_fps(60)
      >>> final_clip = CompositeVideoClip([transfx.slide_out(clip, 1, "right")])
      """
      w, h = clip.size
      ts = clip.duration - duration  # start time of the effect.
      pos_dict = {
          "left": lambda t: (
              min(0, w * (-(t - ts) / duration)),
              "center",
          ),
          "right": lambda t: (
              max(0, w * ((t - ts) / duration)),
              "center",
          ),
          "top": lambda t: (
              "center",
              min(0, h * (-(t - ts) / duration)),
          ),
          "bottom": lambda t: (
              "center",
              max(0, h * ((t - ts) / duration)),
          ),
      }
  
      return clip.with_position(pos_dict[side])
  
imports: from moviepy.decorators import add_mask_if_none, requires_duration
  from moviepy.video.fx.fadein import fadein
  from moviepy.video.fx.fadeout import fadeout
label_desc: Use image node_id 4 for calling a global function with example usage: slide_out(clip, duration, side) and returns: clip