def get_default_qconfig_mapping(
        self,
        quantization_scheme: _QuantizationScheme,
        quantization_config: _Optional[_ModuleLinearQuantizerConfig] = None,
        qconfig: _Optional[_aoquant.QConfig] = None,
    ) -> _aoquant.QConfigMapping:
        """
        Returns default QConfigMapping for a given quantization scheme. If a qconfig is passed,
        it is used as the default qconfig instead.
        """
        supported_modules = self._get_supported_modules()

        qconfig_mapping = _aoquant.QConfigMapping()
        default_qconfig_mapping = _aoquant.get_default_qat_qconfig_mapping()

        # copy qconfig mapping for fixed qparams
        for key in default_qconfig_mapping.object_type_qconfigs:
            if key in _fixed_qparams_modules:
                qconfig_mapping.set_object_type(
                    key, default_qconfig_mapping.object_type_qconfigs[key]
                )

        qconfig = (
            self._get_default_qconfig_from_quantization_scheme(
                quantization_scheme, quantization_config
            )
            if qconfig is None
            else qconfig
        )

        qconfig_mapping.set_global(qconfig)
        for mod_type in supported_modules:
            qconfig_mapping.set_object_type(
                mod_type,
                self._adjust_qconfig_for_module_type(mod_type, qconfig, quantization_config),
            )
        return qconfig_mapping

        Returns default QConfigMapping for a given quantization scheme. If a qconfig is passed,
        it is used as the default qconfig instead.
        
coremltools/optimize/torch/quantization/_qconfig_mapping.py