def set_module_name(
        self, module_name: str, opt_config: _Optional[ModuleOptimizationConfig]
    ) -> "OptimizationConfig":
        """
        Set the module level optimization config for a given module instance. If the module level optimization config
        for an existing module was already set, the new config will override the old one.
        """
        self.module_name_configs[module_name] = opt_config
        return self

        Set the module level optimization config for a given module instance. If the module level optimization config
        for an existing module was already set, the new config will override the old one.
        
coremltools/optimize/torch/optimization_config.py