code: def colors_to_gl(colors, count):
      
  
      colors = np.asanyarray(colors)
      count = int(count)
      if util.is_shape(colors, (count, (3, 4))):
          # convert the numpy dtype code to an opengl one
          colors_dtype = {'f': 'f',
                          'i': 'B',
                          'u': 'B'}[colors.dtype.kind]
          # create the data type description string pyglet expects
          colors_type = 'c' + str(colors.shape[1]) + colors_dtype + '/static'
          # reshape the 2D array into a 1D one and then convert to a python list
          colors = colors.reshape(-1).tolist()
      else:
          # case where colors are wrong shape, use a default color
          colors = np.tile([.5, .10, .20], (count, 1)).reshape(-1).tolist()
          colors_type = 'c3f/static'
  
      return colors_type, colors
docs: Given a list of colors (or None) return a GL- acceptable list of colors
  
      Parameters
      ------------
      colors: (count, (3 or 4)) float
        Input colors as an array
  
      Returns
      ---------
      colors_type : str
        Color type
      colors_gl : (count,) list
        Colors to pass to pyglet