def METHOD_NAME(
    cfg_arch: Dict[str, Any],
    cfg_arch_from_pretrained: Dict[str, Any],
    module_name: str,
    updates: Dict[str, Any],
):
    """
    Function to modify the key-word arguments of modules after the finetuning module if they are kept.
    Parameters:
        cfg_arch: Configuration of the architecture of the model used for finetuning
        cfg_arch_from_pretrained: Configuration of the architecture of the loaded pretrained model
        module_name: Module of loaded pretrained model
        updates: Changes to apply to key-work arguments of selected module
    """
    # We need to distinguish between modules with & without submodules
    if "/" not in module_name:
        if cfg_arch[module_name] is None:
            cfg_arch[module_name] = {}
        cfg_arch_from_pretrained[module_name].update({key: value for key, value in updates.items()})
        cfg_arch.update({module_name, cfg_arch_from_pretrained})
    else:
        module_name, sub_module = module_name.split("/")
        new_sub_module = updates.pop("new_sub_module", sub_module)
        if cfg_arch[module_name] is None:
            cfg_arch[module_name] = {}
        cfg_arch_from_pretrained[module_name][sub_module].update(
            {key: value for key, value in updates.items()}
        )
        cfg_arch[module_name].update({new_sub_module: cfg_arch_from_pretrained[module_name][sub_module]})
    return cfg_arch