code: def fixed_pos_embedding(x):
      seq_len, dim = x.shape
      inv_freq = 1.0 / (10000 ** (torch.arange(0, dim) / dim))
      sinusoid_inp = torch.einsum(
          "i , j -> i j",
          torch.arange(0, seq_len, dtype=torch.float),
          inv_freq,
      ).to(x)
      return torch.sin(sinusoid_inp), torch.cos(sinusoid_inp)
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/position_embedding/xpos_position_embedding.py
imports: import torch
  import torch.nn
  from einops import rearrange
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 1 for calling a global function with example usage: fixed_pos_embedding(x) and returns: torch,  torch