def _all_wants_satisfied(store, haves, wants):
 haves = set(haves)
 if haves:
  earliest = min([store[h].commit_time for h in haves])
 else:
  earliest = 0
 for want in wants:
  if (not _want_satisfied(store, haves, want, earliest)):
   return False
 return True

def _all_wants_satisfied ( store , haves , wants ) : haves = set ( haves ) if haves : earliest = min ( [ store [ h ] . commit_time for h in haves ] ) else : earliest = 0 for want in wants : if ( not _want_satisfied ( store , haves , want , earliest ) ) : return False return True
check whether all the current wants are satisfied by a set of haves .