graph_join function

Join graphs on common nodes