code: def get_colors(n):
      """A helper function to get n colors"""
      from itertools import cycle
  
      import matplotlib
  
      cycler = matplotlib.rcParams["axes.prop_cycle"]
      colors = cycle(cycler)
      colors = [next(colors)["color"] for i in range(n)]
      return colors
  
file_path: pyvista-tutorial-translations/locale/source/tutorial/08_widgets/g_sphere-widget.py
imports: import numpy
  import pyvista
  import numpy
  import pyvista
  import numpy
  import pyvista
  from scipy.interpolate import griddata
label_desc: Use image node_id 3 for calling a global function with example usage: get_colors(n) and returns: colors