<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def broken_faces(mesh, color=None):
 """ Return the index of faces in the mesh which break the watertight status of the mesh. Parameters mesh: Trimesh object color: (4,) uint8, will set broken faces to this color None, will not alter mesh colors Returns broken: (n, ) int, indexes of mesh.faces """

    adjacency = nx.from_edgelist(mesh.face_adjacency)
    broken = [k for k, v in dict(adjacency.degree()).items()
              if v != 3]
    broken = np.array(broken)
    if color is not None:
        # if someone passed a broken color
        color = np.array(color)
        if not (color.shape == (4,) or color.shape == (3,)):
            color = [255, 0, 0, 255]
        mesh.visual.face_colors[broken] = color
    return broken