code: def test_save():
      base = "tests/output_images/"
      if not os.path.exists(base):
          os.mkdir(base)
      x = np.linspace(0, 1, 5)
      y = np.sin(np.pi * x)
  
      block = amp.blocks.ParametricLine(x, y)
      block.ax.set_xlim([0, 1])
      block.ax.set_ylim([0, 1])
  
      anim = amp.Animation([block])
      anim.save_gif(base + "save")
      plt.close("all")
      assert os.path.exists(base + "save.gif")
  
file_path: animatplot/tests/test_animation.py
imports: from matplotlib.testing import setup
  import os
  import pytest
  import numpy
  import matplotlib.pyplot
  from matplotlib.animation import PillowWriter
  import animatplot
  from tests.tools import animation_compare
label_desc: Use image node_id 2 for calling a global function with example usage: test_save() without return types