completed getNets function of NetlistGraph