def get_values_for_names(names, default_value=None):
    """
    Retrieve values for the provided key names (multi get).

    If a KeyValuePair objects for a particular name doesn't exist, the dictionary will contain
    default_value for that name.

    :rtype: ``dict``
    """
    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 (multi get).

    If a KeyValuePair objects for a particular name doesn't exist, the dictionary will contain
    default_value for that name.

    :rtype: ``dict``
    
st2common/st2common/services/keyvalues.py