code: def track_min_max_val(
      wrapper: ModuleWrapper, target_name: str, target: Tensor
  ):
      def amin_reduce_func(converted_target: Tensor):
          return converted_target.detach().amin(dim=-1)
  
      def amax_reduce_func(converted_target: Tensor):
          return converted_target.detach().amax(dim=-1)
  
      if target_name in wrapper.quantization_target_spaces:
          target_space = wrapper.quantization_target_spaces[target_name]
          if target_space._scaler:
              current_amin = target_space._scaler.shrink(
                  target, amin_reduce_func, keepdim=True
              )
              current_amax = target_space._scaler.shrink(
                  target, amax_reduce_func, keepdim=True
              )
          else:
              current_amin = target.detach().reshape(-1).amin(-1)
              current_amax = target.detach().reshape(-1).amax(-1)
          target_space.tracked_max = (
              current_amax
              if target_space.tracked_max is None
              else update_ema(
                  target_space.tracked_max, current_amax, 0.99
              )
          )
          target_space.tracked_min = (
              current_amin
              if target_space.tracked_min is None
              else update_ema(
                  target_space.tracked_min, current_amin, 0.99
              )
          )
  
imports: from __future__ import annotations
  from typing import Dict, List, overload
  import torch
  from torch import Tensor
  from ..base.compressor import Compressor, Quantizer
  from ..base.wrapper import ModuleWrapper
  from ..utils import Evaluator, _EVALUATOR_DOCSTRING
label_desc: Use image node_id 1 for calling a global function with example usage: track_min_max_val(wrapper, target_name, target) and returns: converted_target, converted_target