def get_values_for_names(names, default_value=None):
 result = {}
 kvp_dbs = KeyValuePair.get_by_names(names=names)
 name_to_kvp_db_map = {}
 for kvp_db in kvp_dbs:
  name_to_kvp_db_map[kvp_db.name] = kvp_db.value
 for name in names:
  result[name] = name_to_kvp_db_map.get(name, default_value)
 return result

def get_values_for_names ( names , default_value = None ) : result = { } kvp_dbs = KeyValuePair . get_by_names ( names = names ) name_to_kvp_db_map = { } for kvp_db in kvp_dbs : name_to_kvp_db_map [ kvp_db . name ] = kvp_db . value for name in names : result [ name ] = name_to_kvp_db_map . get ( name , default_value ) return result
retrieve values for the provided key names .