@classmethod
def validate_faces(cls, faces):
    """Raises an exception if not all faces in ``faces`` are defining either all triangles, lines
        or points.

        Parameters
        ----------
        faces : list

        Returns
        -------

        """
    if not faces:
        return
    if len(faces[0]) > 3:
        raise Exception(
            'Invalid mesh. Expected mesh composed of points, lines xor triangles.'
            )
    for face in faces:
        if len(face) != len(faces[0]):
            raise NotImplementedError(
                'Invalid mesh. Expected mesh composed of points, lines xor triangles.'
                )
