def merge_configs(default_dict: dict, overriding_dict: dict) -> dict:
    """
    Args:
        default_dict:  The 'dict' config with the default values to be overwritten.
        overriding_dict: The 'dict' config with the new values. If it has some missing keys the default values
            from the default_dict will be kept.

    Returns:
        The merged 'dict' config with the overwritten values.
    """

    for overriding_key, overriding_value in overriding_dict.items():
        if overriding_key not in default_dict:
            default_dict[overriding_key] = overriding_value
        elif not isinstance(overriding_value, dict):
            default_dict[overriding_key] = overriding_value
        else:
            default_dict[overriding_key] = merge_configs(
                default_dict[overriding_key],
                overriding_dict[overriding_key]
            )

    return default_dict