class_docstr: A custom torch dispatch mode to calibrate quantized modules.
  
  In order to improve the accuracy of the quantized activations, the input and output
  scales of each quantized module are evaluated per-batch using the absmax algorithm and aggregated using a
  momentum.
  
  The dispatch mode also tracks the calls to each torch function down the model graph, and applies optional
  optimizations:
  - streamline: do not quantize activations that are immediately consumed by an incompatible function (like `add` or `silu`).
  
  Args:
      momentum (`float`): the momentum to use when updating scales.
      streamline (`bool`): if True, avoid quantizing activations when they are consumed by an incompatible function. Defaults to True.
      debug (`bool`): provide very verbose feedback on the console during calibration.
code: def __enter__(self):
      super().__enter__()
      self.pre_handle = register_module_forward_pre_hook(
          self.calibrate_input
      )
      self.post_handle = register_module_forward_hook(
          self.calibrate_output
      )
  
file_path: quanto/quanto/calibrate.py
imports: import torch
  from torch.nn.modules.module import register_module_forward_hook, register_module_forward_pre_hook
  from torch.overrides import TorchFunctionMode
  from .nn import QModuleMixin
  from .tensor import QTensor, absmax_scale
label_desc: Use image node_id 3 for calling the Calibration obj's underlying member method code with example usage: obj.__enter__() without return types