class_docstr: Test Transformer Encoder
code: def test_learned(self):
      pos_embed = build_position_encoding(
          hidden_dim=2 * 2, position_embedding="learned"
      )
      out = pos_embed(self.x)
      self.assertTrue(out.shape == (1, 4, 1, 2))
  
imports: import unittest
  import torch
  from towhee.models.layers.position_encoding import build_position_encoding
label_desc: Use image node_id 2 for calling the TestPositionEncoding obj's underlying member method code with example usage: obj.test_learned() without return types