<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fan_triangulate(indices):
 """Return an array of vertices in triangular order using a fan triangulation algorithm."""

    if len(indices[0]) != 4:
        raise ValueError("Assumes working with a sequence of quad indices")
    new_indices = []
    for face in indices:
        new_indices.extend([face[:-1], face[1:]])
    return np.array(new_indices)