code: def soft_copy_param(target_link, source_link, tau):
      """Soft-copy parameters of a link to another link."""
      target_params = dict(target_link.namedparams())
      for param_name, param in source_link.namedparams():
          if target_params[param_name].array is None:
              raise TypeError(
                  "target_link parameter {} is None. Maybe the model params are "
                  "not initialized.\nPlease try to forward dummy input "
                  "beforehand to determine parameter shape of the model.".format(
                      param_name
                  )
              )
          target_params[param_name].array[...] *= 1 - tau
          target_params[param_name].array[...] += tau * param.array
  
      # Soft-copy Batch Normalization's statistics
      target_links = dict(target_link.namedlinks())
      for link_name, link in source_link.namedlinks():
          if isinstance(link, L.BatchNormalization):
              target_bn = target_links[link_name]
              target_bn.avg_mean[...] *= 1 - tau
              target_bn.avg_mean[...] += tau * link.avg_mean
              target_bn.avg_var[...] *= 1 - tau
              target_bn.avg_var[...] += tau * link.avg_var
  
imports: from chainer import links
label_desc: Use image node_id 2 for calling a global function with example usage: soft_copy_param(target_link, source_link, tau) without return types