code: def test_animation():
      def plot(i):
          return (
              qplot(x, y, color=colors[i], xlab="x", ylab="y")
              + lims(color=(1, 7))
              + labs(color="color")
              + theme_minimal()
          )
  
      plots = [plot(i) for i in range(3)]
      _PlotnineAnimation(plots, interval=100, repeat_delay=500)
  
file_path: plotnine/tests/test_animation.py
imports: import matplotlib.pyplot
  import pytest
  from plotnine import labs, lims, qplot, theme_minimal
  from plotnine.animation import PlotnineAnimation
  from plotnine.exceptions import PlotnineError
label_desc: Use image node_id 1 for calling a global function with example usage: test_animation() and returns: unknown