<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def points_to_vertexlist(points, colors=None, group=None, **kwargs):
 """ Convert a numpy array of 3D points to args for a vertex list constructor. Parameters points : (n, 3) float Points to be rendered colors : (n, 3) or (n, 4) float Colors for each point group : str Rendering group for the vertex list Returns args : (7,) tuple Args for vertex list constructor """

    points = np.asanyarray(points, dtype=np.float64)

    if util.is_shape(points, (-1, 2)):
        points = np.column_stack((points, np.zeros(len(points))))
    elif not util.is_shape(points, (-1, 3)):
        raise ValueError('Pointcloud must be (n,3)!')

    index = np.arange(len(points)).tolist()

    args = (len(points),  # number of vertices
            GL_POINTS,   # mode
            group,       # group
            index,       # indices
            ('v3f/static', points.reshape(-1)),
            colors_to_gl(colors, len(points)))
    return args