code: def forward(self, pos_seq, bsz=None):
      #        sinusoid_inp = torch.ger(pos_seq, self.inv_freq)
      sinusoid_inp = torch.matmul(
          torch.unsqueeze(pos_seq, -1),
          torch.unsqueeze(self.inv_freq, 0),
      )
  
      pos_emb = torch.cat(
          [sinusoid_inp.sin(), sinusoid_inp.cos()], dim=1
      )
      if bsz is not None:
          return pos_emb[None, :, :].repeat(bsz, 1, 1)
      else:
          return pos_emb[None, :, :]
  
imports: from typing import Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from nemo.collections.tts.modules.submodules import ConditionalInput, ConditionalLayerNorm, LinearNorm
  from nemo.collections.tts.parts.utils.helpers import get_mask_from_lengths
  from nemo.core.classes import NeuralModule, adapter_mixins, typecheck
  from nemo.core.neural_types.elements import EncodedRepresentation, LengthsType, MaskType, TokenIndex
  from nemo.core.neural_types.neural_type import NeuralType
label_desc: Use image node_id 2 for calling the PositionalEmbedding obj's underlying member method code with example usage: obj.forward(pos_seq, bsz) and returns: pos_emb, pos_emb