def set_module_type(
        self, object_type: _Union[_Callable, str], opt_config: _Optional[ModuleOptimizationConfig]
    ) -> "OptimizationConfig":
        """
        Set the module level optimization config for a given module type. If the module level optimization config
        for an existing module type was already set, the new config will override the old one.
        """
        self.module_type_configs[object_type] = opt_config
        return self

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