def add_to_dict_if_not_present(target_dict, target_key, value):
    """Adds the given value to the give dict as the given key
       only if the given key is not in the given dict yet.
    """

    if target_key in target_dict:
        return False

    target_dict[target_key] = value
    return True