code: def test_learnedFourierPe_extendable(
      dtype, device, apply_scaling, hidden_dim
  ):
      if device == "cuda" and not torch.cuda.is_available():
          pytest.skip("no cuda device is available")
      dtype = getattr(torch, dtype)
      dim = 2
      pe = LearnableFourierPosEnc(
          dim, apply_scaling=apply_scaling, hidden_dim=hidden_dim
      ).to(dtype=dtype, device=device)
      x = torch.rand(2, 3, dim, dtype=dtype, device=device)
      pe(x)
  
      x = torch.rand(2, 5, dim, dtype=dtype, device=device)
      pe(x)
  
file_path: espnet/test/test_positional_encoding.py
imports: import pytest
  import torch
  from espnet.nets.pytorch_backend.transformer.embedding import LearnableFourierPosEnc, PositionalEncoding, ScaledPositionalEncoding
label_desc: Use image node_id 2 for calling a global function with example usage: test_learnedFourierPe_extendable(dtype, device, apply_scaling, hidden_dim) without return types