class_docstr: Custom configuration for :func:`~torch.ao.quantization.quantize_fx.convert_fx`.
  
  Example usage::
  
      convert_custom_config = ConvertCustomConfig()             .set_observed_to_quantized_mapping(ObservedCustomModule, QuantizedCustomModule)             .set_preserved_attributes(["attr1", "attr2"])
class_docstr_tok: ["Custom","configuration","for",":","func",":","`","~torch.ao.quantization.quantize_fx.convert_fx","`",".","Example","usage",":",":","convert_custom_config","=","ConvertCustomConfig","(",")",".set_observed_to_quantized_mapping","(","ObservedCustomModule",",","QuantizedCustomModule",")",".set_preserved_attributes","(","[","``","attr1","''",",","``","attr2","''","]",")"]
docstr: Set the mapping from a custom observed module class to a custom quantized module class.
  
  The quantized module class must have a ``from_observed`` class method that converts the observed module class
  to the quantized module class.
docstr_tok: ["Set","the","mapping","from","a","custom","observed","module","class","to","a","custom","quantized","module","class",".","The","quantized","module","class","must","have","a","``","from_observed","``","class","method","that","converts","the","observed","module","class","to","the","quantized","module","class","."]
code: def set_observed_to_quantized_mapping(
      self,
      observed_class: Type,
      quantized_class: Type,
      quant_type: QuantType = QuantType.STATIC,
  ) -> ConvertCustomConfig:
      """
      Set the mapping from a custom observed module class to a custom quantized module class.
  
      The quantized module class must have a ``from_observed`` class method that converts the observed module class
      to the quantized module class.
      """
      if quant_type not in self.observed_to_quantized_mapping:
          self.observed_to_quantized_mapping[quant_type] = {}
      self.observed_to_quantized_mapping[quant_type][
          observed_class
      ] = quantized_class
      return self
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple, Type
  from torch.ao.quantization import QConfigMapping
  from torch.ao.quantization.backend_config import BackendConfig
  from torch.ao.quantization.quant_type import QuantType, _quant_type_from_str, _get_quant_type_to_str
label_desc: Use image node_id 3 for calling the ConvertCustomConfig obj's underlying member method code with example usage: obj.set_observed_to_quantized_mapping(observed_class, quantized_class, quant_type) and returns: self