Get passing weighted graph function