code: def test_init_works(self) -> None:
      m = SinusoidalPositionEncoder(
          encoding_dim=32, max_seq_len=10, device=device
      )
  
      assert_close(m.freqs, self.expected_freqs())
  
imports: import pytest
  import torch
  from torch import Tensor
  from fairseq2.nn import IncrementalStateBag, LearnedPositionEncoder, RotaryEncoder, SinusoidalPositionEncoder
  from tests.common import assert_close, device, tmp_rng_seed
label_desc: Use image node_id 2 for calling the TestSinusoidalPositionEncoder obj's underlying member method code with example usage: obj.test_init_works() without return types