networkcommons.methods.keep_controllable_neighbours

networkcommons.methods.keep_controllable_neighbours(source_dict, graph)

This function filters out nodes from a dictionary of source nodes that are not controllable from the graph.

Parameters: - source_dict: A dictionary of source nodes. - graph: A NetworkX graph.

Returns: - A dictionary of source nodes that are observable from the graph.