(p, node_filter)
return contained_paths
Returns the set of maximum-length sub-paths of the path p, which
        only contain nodes that appear in the node_filter. As an example, 
        for the path (a,b,c,d,e,f,g) and a node_filter [a,b,d,f,g], the method 
        will return [(a,b), (d,), (f,g)].

        @param p: a path tuple to check for contained paths
        @param node_filter: a set of nodes to which the contained paths should be limited
Returns the set of maximum-length sub-paths of the path p, which
        only contain nodes that appear in the node_filter. As an example, 
        for the path (a,b,c,d,e,f,g) and a node_filter [a,b,d,f,g], the method 
        will return [(a,b), (d,), (f,g)].
Returns the set of maximum - length sub - paths of the path p which only contain nodes that appear in the node_filter . As an example for the path ( a b c d e f g ) and a node_filter [ a b d f g ] the method will return [ ( a b ) ( d ) ( f g ) ] .
def getContainedPaths(p, node_filter):
        """
        Returns the set of maximum-length sub-paths of the path p, which
        only contain nodes that appear in the node_filter. As an example, 
        for the path (a,b,c,d,e,f,g) and a node_filter [a,b,d,f,g], the method 
        will return [(a,b), (d,), (f,g)].

        @param p: a path tuple to check for contained paths
        @param node_filter: a set of nodes to which the contained paths should be limited
        """
        contained_paths = []
        current_path = ()
        for k in range(0, len(p)):
            if p[k] in node_filter:
                current_path += (p[k],)
            else:
                if len(current_path)>0:
                    contained_paths.append(current_path)
                    current_path = ()
        if len(current_path)>0:
            contained_paths.append(current_path)        
        
        return contained_paths
def getContainedPaths ( p , node_filter ) : contained_paths = [ ] current_path = ( ) for k in range ( 0 , len ( p ) ) : if p [ k ] in node_filter : current_path += ( p [ k ] , ) else : if len ( current_path ) > 0 : contained_paths . append ( current_path ) current_path = ( ) if len ( current_path ) > 0 : contained_paths . append ( current_path ) return contained_paths