code: def test_resize():
      encoding = SinusoidalEncoding(model_dim=10, max_len=3)
      foo = encoding(torch.tensor([5]))
      assert foo.shape == (1, 10)
  
file_path: stanza/stanza/tests/constituency/test_positional_encoding.py
imports: import pytest
  import torch
  from stanza import Pipeline
  from stanza.models.constituency.positional_encoding import SinusoidalEncoding, AddSinusoidalEncoding
  from stanza.tests import *
label_desc: Use image node_id 2 for calling a global function with example usage: test_resize() without return types