replace add_edges with add_edge and add_edges_from function

_update_node_parents and _update_node_rule_for_parents functions need to be written