code: def _animate(i, data, plot):
      """Helper animation function that is called sequentially
      :class:`matplotlib.animation.FuncAnimation`
      """
      current_pos = data[i]
      if np.array(current_pos).shape[1] == 2:
          plot.set_offsets(current_pos)
      else:
          plot._offsets3d = current_pos.T
      return (plot,)
  
file_path: pyswarms/pyswarms/utils/plotters/plotters.py
imports: import logging
  import matplotlib.pyplot
  import numpy
  import multiprocessing
  from matplotlib import animation, cm
  from mpl_toolkits.mplot3d import Axes3D
  from ..reporter import Reporter
  from .formatters import Animator, Designer
label_desc: Use image node_id 4 for calling a global function with example usage: _animate(i, data, plot) and returns: plot