code: def update_tracked_value(
      original_val: Union[Tensor, None],
      current_val: Tensor,
      mode: str = "max",
  ):
      if original_val is None:
          return current_val
      assert current_val is not None
      assert original_val.shape == current_val.shape
      if mode == "max":
          return torch.max(original_val, current_val)
      elif mode == "min":
          return torch.min(original_val, current_val)
      else:
          raise TypeError(f"Type:{mode} is not supported")
  
imports: from __future__ import annotations
  from typing import List, Dict, Union, overload
  import torch
  from torch import Tensor
  from ..base.compressor import Compressor, Quantizer
  from ..base.wrapper import ModuleWrapper
  from ..base.target_space import QuantizationTargetSpace
  from ..utils import Evaluator, _EVALUATOR_DOCSTRING
label_desc: Use image node_id 2 for calling a global function with example usage: update_tracked_value(original_val, current_val, mode) and returns: current_val, torch, torch