code: def test_forward(self):
      pos_encoder = PositionalEncoding()
      x = torch.rand(1, 30, 512)
      out = pos_encoder(x)
      assert out.size() == x.size()
  
imports: from unittest import TestCase
  import torch
  from mmocr.models.common.modules import PositionalEncoding
label_desc: Use image node_id 1 for calling the TestPositionalEncoding obj's underlying member method code with example usage: obj.test_forward() without return types