code: def update_ema(biased_ema, value, decay):
      """
      calculate biased stat and unbiased stat in each step using exponential moving average method
  
      Parameters
      ----------
      biased_ema : float
          previous stat value
      value : float
          current stat value
      decay : float
          the weight of previous stat value, larger means smoother curve
  
      Returns
      -------
      float, float
      """
      biased_ema = biased_ema * decay + (1 - decay) * value
      return biased_ema
  
imports: import logging
  import copy
  import torch
  from schema import Schema, And, Or, Optional
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Quantizer, QuantGrad, QuantType
label_desc: Use image node_id 1 for calling a global function with example usage: update_ema(biased_ema, value, decay) and returns: biased_ema