Create get_all_referenced_nodes.py