def prepare(self, model: _nn.Module, example_inputs: _Tuple[_Any, ...]):
        """
        Performs graph passes on model to configure activation and weight quantization layers.
        """
        model = _prepare_qat_fx(
            model,
            prepare_custom_config=self._prepare_custom_config,
            qconfig_mapping=self._qconfig_mapping,
            example_inputs=example_inputs,
            backend_config=self._backend_config,
        )

        self._setup_fake_quant_module_device(model, example_inputs)
        self._act_quant_groups = _group_activation_quantization_modules_by_id(model)
        if self._quantization_scheme == _QuantizationScheme.symmetric:
            self._mark_always_affine_layers_for_replacement(model)
            self._mark_always_affine_combination_ops_for_replacement(model)
        self._mark_fixed_qparams_modules_for_replacement(model)
        self._replace_weight_fake_quant_for_embedding_layers(model)
        model = self._replace_activation_quantizers(model)
        model = self._remove_activation_quantizer_after_dropout(model)
        return model

        Performs graph passes on model to configure activation and weight quantization layers.
        
coremltools/optimize/torch/quantization/_configure.py