code: def rotate_half(x):
      x1, x2 = x.chunk(2, dim=-1)
      return torch.cat((-x2, x1), dim=-1)
  
file_path: xformers/xformers/components/positional_embedding/rotary.py
imports: from typing import Tuple
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: rotate_half(x) and returns: torch