def find_faces_with_vertex(index, faces):
    """
    For a given vertex, find all faces containing this vertex.
    Note: faces do not have to be triangles.

    Parameters
    ----------
    index : integer
        index to a vertex
    faces : list of lists of three integers
        the integers for each face are indices to vertices, starting from zero

    Returns
    -------
    faces_with_vertex : list of lists of three integers
        the integers for each face are indices to vertices, starting from zero

    Examples
    --------
    >>> # Simple example:
    >>> from mindboggle.guts.mesh import find_faces_with_vertex
    >>> faces = [[0,1,2],[0,2,3],[0,3,4],[0,1,4],[4,3,1]]
    >>> index = 3
    >>> find_faces_with_vertex(index, faces)
    [[0, 2, 3], [0, 3, 4], [4, 3, 1]]

    """
    faces_with_vertex = [x for x in faces if index in x]

    return faces_with_vertex