code: def _test_rotary():
      """
      Testing RoPE with a simple example
      """
      x = torch.tensor(
          [[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10]], dtype=torch.float
      )
      x = x[:, None, None, :]
      inspect(x)
  
      rotary_pe = RotaryPositionalEmbeddings(3)
      inspect(rotary_pe(x))
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/transformers/rope/__init__.py
imports: import torch
  from torch import nn
  from labml.logger import inspect
  from labml_nn.transformers.mha import MultiHeadAttention
label_desc: Use image node_id 1 for calling a global function with example usage: _test_rotary() without return types