code: def ema_update(ema_model_tuple, current_model_tuple, decay):
      torch._foreach_mul_(ema_model_tuple, decay)
      torch._foreach_add_(
          ema_model_tuple,
          current_model_tuple,
          alpha=(1.0 - decay),
      )
  
imports: import contextlib
  import copy
  import os
  import threading
  from typing import Any, Dict, Iterable
  import pytorch_lightning
  import torch
  from pytorch_lightning import Callback
  from pytorch_lightning.utilities.exceptions import MisconfigurationException
  from pytorch_lightning.utilities.rank_zero import rank_zero_info
label_desc: Use image node_id 1 for calling a global function with example usage: ema_update(ema_model_tuple, current_model_tuple, decay) without return types