def _run_on_all_nodes(nodes, task):
 return parallel(list((run_remotely(username='root', address=node.address, commands=task(node)) for node in nodes)))

def _run_on_all_nodes ( nodes , task ) : return parallel ( list ( ( run_remotely ( username = 'root' , address = node . address , commands = task ( node ) ) for node in nodes ) ) )
run some commands on some nodes .