def getNode(name, l): return next((i for i in l if i.name == name), -1)