code: def initialize(float_module_list=None, custom_quant_modules=None):
      """Dynamic module replacement using monkey patching.
  
      Dynamically monkey patches the modules with their quantized versions. Internally, the
      state is maintained by a helper class object which helps in replacing the original
      modules back.
  
      Args:
          float_module_list: A list. User supplied list which indicates which modules to not monkey patch.
          custom_quant_modules: A dict. A mapping provided by user to indicate any other module apart
              from torch.nn and its corresponding quantized version.
  
      Returns:
          nothing.
  
      Typical usage example:
  
          # Define the deny list for torch.nn modules and custom map for modules other than torch.nn.
          float_module_list = ["Linear"]
          custom_quant_modules = [(torch.nn, "Linear", quant_nn.QuantLinear)]
          ## Monkey patch the modules
          csrc.pytorch.pytorch_quantization.quant_modules.initialize(float_module_list, custom_modules)
          ## Use the quantized modules
          csrc.pytorch.pytorch_quantization.quant_modules.deactivate()
      """
      _quant_module_helper_object.prepare_state(
          float_module_list, custom_quant_modules
      )
      _quant_module_helper_object.apply_quant_modules()
  
file_path: lightseq/lightseq/csrc/pytorch/pytorch_quantization/quant_modules.py
imports: from collections import namedtuple
  import torch
  from csrc.pytorch.pytorch_quantization import nn
label_desc: Use image node_id 1 for calling a global function with example usage: initialize(float_module_list, custom_quant_modules) without return types