add a helper in dfgGraph to return a list of nodes of certain types