def generate_moves(self):
    moves = []
    temporary_moves = {}
    if (0 < self.node_set_size_limit <= len(self.current_node_set)):
        return moves
    if (not self.current_node_set):
        for node in self.full_node_set:
            moves.append((node, set()))
        return moves
    possible_nodes = (self.full_node_set - self.current_node_set)
    for possible_node in possible_nodes:
        destination_nodes = (self.edges_by_source[possible_node] & self.current_node_set)
        source_nodes = (self.edges_by_destination[possible_node] & self.current_node_set)
        if ((len(destination_nodes) > 0) or (len(source_nodes) > 0)):
            if (self.id(node=possible_node) in self.visited_states):
                continue
            edges = (set((edge for source_node in source_nodes for edge in self.labels[(source_node, possible_node)])) | set((edge for destination_node in destination_nodes for edge in self.labels[(possible_node, destination_node)])))
            temporary_moves[possible_node] = edges
    for move in temporary_moves:
        moves.append((move, temporary_moves[move]))
    return moves
def generate_moves(self):
    moves = []
    temporary_moves = {}
    if (0 < self.node_set_size_limit <= len(self.current_node_set)):
        return moves
    if (not self.current_node_set):
        for node in self.full_node_set:
            moves.append((node, set()))
        return moves
    possible_nodes = (self.full_node_set - self.current_node_set)
    for possible_node in possible_nodes:
        destination_nodes = (self.edges_by_source[possible_node] & self.current_node_set)
        source_nodes = (self.edges_by_destination[possible_node] & self.current_node_set)
        if ((len(destination_nodes) > 0) or (len(source_nodes) > 0)):
            if (self.id(node=possible_node) in self.visited_states):
                continue
            edges = (set((edge for source_node in source_nodes for edge in self.labels[(source_node, possible_node)])) | set((edge for destination_node in destination_nodes for edge in self.labels[(possible_node, destination_node)])))
            temporary_moves[possible_node] = edges
    for move in temporary_moves:
        moves.append((move, temporary_moves[move]))
    return moves