code: def rotate_every_two(x):
      x1 = x[:, :, ::2]
      x2 = x[:, :, 1::2]
      x = torch.stack((-x2, x1), dim=-1)
      return x.flatten(-2)
  
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 2 for calling a global function with example usage: rotate_every_two(x) and returns: x