code: def test_positional_encoding():
      layer = PositionalEncoding(50)
      inp = torch.rand(32, 50, 100)
      nl = torch.rand(32)
      o = layer(inp, nl)
  
      assert o.shape[0] == 32
      assert o.shape[1] == 50
      assert o.shape[2] == 100
      assert isinstance(o, torch.FloatTensor)
  
file_path: TTS/tests/test_wavegrad_layers.py
imports: import torch
  from TTS.vocoder.layers.wavegrad import PositionalEncoding, FiLM, UBlock, DBlock
  from TTS.vocoder.models.wavegrad import Wavegrad
label_desc: Use image node_id 1 for calling a global function with example usage: test_positional_encoding() without return types