def make_managed_nodes(addresses, distribution):
 [address_type] = set((type(address) for address in addresses))
 if (address_type is list):
  return [ManagedNode(address=address, private_address=private_address, distribution=distribution) for (private_address, address) in addresses]
 else:
  return [ManagedNode(address=address, distribution=distribution) for address in addresses]

def make_managed_nodes ( addresses , distribution ) : [ address_type ] = set ( ( type ( address ) for address in addresses ) ) if ( address_type is list ) : return [ ManagedNode ( address = address , private_address = private_address , distribution = distribution ) for ( private_address , address ) in addresses ] else : return [ ManagedNode ( address = address , distribution = distribution ) for address in addresses ]
create a list of managed nodes from a list of node addresses or address pairs .