code: def _rotate_half(x: torch.Tensor) -> torch.Tensor:
      """Change sign so the last dimension becomes [-odd, +even]
  
      Args:
          x (Tensor): Input tensor
  
      Returns:
          Tensor: Tensor rotated half
      """
  
      x1, x2 = torch.chunk(x, 2, dim=-1)
      return torch.cat((-x2, x1), dim=-1)
  
file_path: apex/tests/L0/run_transformer/test_fused_rope.py
imports: import itertools
  import torch
  from torch.testing._internal import common_utils
  from apex.transformer.functional import fused_apply_rotary_pos_emb, fused_apply_rotary_pos_emb_cached, fused_apply_rotary_pos_emb_thd
label_desc: Use image node_id 1 for calling a global function with example usage: _rotate_half(x) and returns: torch