def get_host_info(node_info, host):
 if (node_info.get('roles', []) == ['master']):
  return None
 return host

def get_host_info ( node_info , host ) : if ( node_info . get ( 'roles' , [ ] ) == [ 'master' ] ) : return None return host
simple callback that takes the node info from /_cluster/nodes and a parsed connection information and return the connection information .