def check_versions(service, versions, required, recommended=None):
 must_upgrade = dict(filter((lambda x: (required > x[1])), versions.items()))
 if must_upgrade:
  raise InvalidConfiguration(make_upgrade_message(service, 'must', required, must_upgrade))
 if recommended:
  should_upgrade = dict(filter((lambda x: (recommended > x[1])), versions.items()))
  if should_upgrade:
   warnings.warn(make_upgrade_message(service, 'should', recommended, should_upgrade), PendingDeprecationWarning)

def check_versions ( service , versions , required , recommended = None ) : must_upgrade = dict ( filter ( ( lambda x : ( required > x [ 1 ] ) ) , versions . items ( ) ) ) if must_upgrade : raise InvalidConfiguration ( make_upgrade_message ( service , 'must' , required , must_upgrade ) ) if recommended : should_upgrade = dict ( filter ( ( lambda x : ( recommended > x [ 1 ] ) ) , versions . items ( ) ) ) if should_upgrade : warnings . warn ( make_upgrade_message ( service , 'should' , recommended , should_upgrade ) , PendingDeprecationWarning )
check that hosts fulfill version requirements .