code: def _update_local_model_params(experts, gradients):
      for expert in range(len(experts)):
          old_params = tuple(experts[expert].parameters())
          for old, new in zip(
              old_params,
              _unflatten_dense_tensors(gradients[expert], old_params),
          ):
              if torch.is_tensor(old.grad):
                  old.grad.copy_(new)
              else:
                  old.grad = new
  
imports: import torch
  from torch.autograd import Function
  import fmoe_cuda
  from .utils import get_torch_default_comm
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
  from copy import deepcopy
label_desc: Use image node_id 8 for calling a global function with example usage: _update_local_model_params(experts, gradients) without return types