(self, node, parent)
Decide if the given node should be included in the search process.
        
        @type  node: node
        @param node: Given node.
        
        @type  parent: node
        @param parent: Given node's parent in the spanning tree.
        
        @rtype: boolean
        @return: Whether the given node should be included in the search process.
Decide if the given node should be included in the search process.
Decide if the given node should be included in the search process .
def __call__(self, node, parent):
        """
        Decide if the given node should be included in the search process.
        
        @type  node: node
        @param node: Given node.
        
        @type  parent: node
        @param parent: Given node's parent in the spanning tree.
        
        @rtype: boolean
        @return: Whether the given node should be included in the search process. 
        """
        
        def cost_to_root(node):
            if (node is not None):
                return cost_to_parent(node, st[node]) + cost_to_root(st[node])
            else:
                return 0
        
        def cost_to_parent(node, parent):
            if (parent is not None):
                return gr.edge_weight((parent, node))
            else:
                return 0
        
        gr = self.graph
        st = self.spanning_tree
        
        cost =  cost_to_parent(node, parent) + cost_to_root(parent)
        
        if (cost <= self.radius):
            return True
        else:
            return False
def __call__ ( self , node , parent ) : def cost_to_root ( node ) : if ( node is not None ) : return cost_to_parent ( node , st [ node ] ) + cost_to_root ( st [ node ] ) else : return 0 def cost_to_parent ( node , parent ) : if ( parent is not None ) : return gr . edge_weight ( ( parent , node ) ) else : return 0 gr = self . graph st = self . spanning_tree cost = cost_to_parent ( node , parent ) + cost_to_root ( parent ) if ( cost <= self . radius ) : return True else : return False