code: def __init__(self, dim):
      super().__init__()
      inv_freq = 1.0 / (
          10000 ** (torch.arange(0, dim, 2).float() / dim)
      )
      self.register_buffer("inv_freq", inv_freq)
  
imports: import torch
  import torch.nn.functional
  from einops import rearrange
  from torch import matmul, nn
label_desc: Use image node_id 1 to create a new RotaryEmbedding object from inherited base classes: nn with example: obj = RotaryEmbedding(dim)