class_docstr: To help replace torch.nn modules with quantized versions.
  
  This module is used to replace (by monkey patching) the torch.nn modules with their
  quantized versions as provided by either tool's internal implementation or any other
  user provided custom module.
  
  Attributes:
      orginal_func_map: A dict. Maintains the original torch.nn module mapping.
      quant_support_list: A list. Contains the names of modules for which a quantized
          version is provided by the tool.
      quant_map: A dict. Contains the map of the module name and its quantized versions.
      quant_switch_opt: A dict. A map to indicate which modules to be left unreplaced with
          their quantized versions. This dict is updated by a list provided from the user
          which indicates the modules to leave out in monkey patching.
docstr: For the modules registered in the quant_map, simply monkey patch them and also store the
  original modules so that they could be later replaced back.
docstr_tok: ["For","the","modules","registered","in","the","quant_map",",","simply","monkey","patch","them","and","also","store","the","original","modules","so","that","they","could","be","later","replaced","back","."]
code: def apply_quant_modules(self):
      """
      For the modules registered in the quant_map, simply monkey patch them and also store the
      original modules so that they could be later replaced back.
      """
      for entry in self.quant_map:
          setattr(entry.orig_mod, entry.mod_name, entry.replace_mod)
  
file_path: lightseq/lightseq/training/pytorch_quantization/quant_modules.py
imports: from collections import namedtuple
  import torch
  from lightseq.training.pytorch_quantization import nn
label_desc: Use image node_id 3 for calling the QuantModuleReplacementHelper obj's underlying member method code with example usage: obj.apply_quant_modules() without return types