def _determine_host(data, omit=''):
 host = ''
 bestmem = 0
 for (hv_, comps) in six.iteritems(data):
  if (hv_ == omit):
   continue
  if (not isinstance(comps, dict)):
   continue
  if (comps.get('freemem', 0) > bestmem):
   bestmem = comps['freemem']
   host = hv_
 return host

def _determine_host ( data , omit = '' ) : host = '' bestmem = 0 for ( hv_ , comps ) in six . iteritems ( data ) : if ( hv_ == omit ) : continue if ( not isinstance ( comps , dict ) ) : continue if ( comps . get ( 'freemem' , 0 ) > bestmem ) : bestmem = comps [ 'freemem' ] host = hv_ return host
determine what the most resource free host is based on the given data .