code: def accel_decel(
      clip, new_duration=None, abruptness=1.0, soonness=1.0
  ):
      """Accelerates and decelerates a clip, useful for GIF making.
  
      Parameters
      ----------
  
      new_duration : float
        Duration for the new transformed clip. If None, will be that of the
        current clip.
  
      abruptness : float
        Slope shape in the acceleration-deceleration function. It will depend
        on the value of the parameter:
  
        * ``-1 < abruptness < 0``: speed up, down, up.
        * ``abruptness == 0``: no effect.
        * ``abruptness > 0``: speed down, up, down.
  
      soonness : float
        For positive abruptness, determines how soon the transformation occurs.
        Should be a positive number.
  
      Raises
      ------
  
      ValueError
        When ``sooness`` argument is lower than 0.
  
      Examples
      --------
  
      The following graphs show functions generated by different combinations
      of arguments, where the value of the slopes represents the speed of the
      videos generated, being the linear function (in red) a combination that
      does not produce any transformation.
  
      .. image:: /_static/accel_decel-fx-params.png
         :alt: acced_decel FX parameters combinations
      """
      if new_duration is None:
          new_duration = clip.duration
      if soonness < 0:
          raise ValueError("'sooness' should be a positive number")
  
      return clip.time_transform(
          lambda t: _f_accel_decel(
              t, clip.duration, new_duration, abruptness, soonness
          )
      ).with_duration(new_duration)
  
label_desc: Use image node_id 2 for calling a global function with example usage: accel_decel(clip, new_duration, abruptness, soonness) and returns: clip