def _ply_verts(vertex_coords, vertex_colors=None):
    """
    Return a string representing the vertices in PLY format. Vertex colors are optional.
    """
    if vertex_coords.shape[0] == 0:
        return ''
    vert_reps = ["%f %f %f" % (v[0], v[1], v[2]) for v in vertex_coords]                      # x, y, z coords
    if vertex_colors is not None:
        col_reps = [" %d %d %d %d" % (c[0], c[1], c[2], c[3]) for c in vertex_colors]      # RGBA values of color
        vert_col_reps = [i+j for i,j in zip(vert_reps, col_reps)]
        return '\n'.join(vert_col_reps) + '\n'
    else:
        return '\n'.join(vert_reps) + '\n'