code: def _allreduce_embedding_grads(
      model: List[torch.nn.Module], config: TransformerConfig
  ):
      """
      All-reduce both word and position embeddings.
      """
      _allreduce_word_embedding_grads(model, config)
      _allreduce_position_embedding_grads(model, config)
  
file_path: megatron-lm/megatron/core/distributed/finalize_model_grads.py
imports: from typing import List
  import torch
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
  from ..None import parallel_state
  from ..transformer.transformer_config import TransformerConfig
  from ..utils import get_attr_wrapped_model, get_model_config
label_desc: Use image node_id 3 for calling a global function with example usage: _allreduce_embedding_grads(model, config) without return types