code: def apply_rotary_pos_emb(pos, t):
      return (t * pos.cos()) + (rotate_half(t) * pos.sin())
  
imports: import torch
  import torch.nn.functional
  from einops import rearrange
  from torch import matmul, nn
label_desc: Use image node_id 2 for calling a global function with example usage: apply_rotary_pos_emb(pos, t) and returns: unknown