code: def test_STFTEncoder_reconfig_for_fs():
      encoder = STFTEncoder(
          n_fft=512,
          win_length=512,
          hop_length=256,
          window="hann",
          center=True,
          normalized=False,
          onesided=True,
          use_builtin_complex=True,
          default_fs=16000,
      )
  
      x = torch.rand(1, 8000, dtype=torch.float32)
      ilens = torch.tensor([8000], dtype=torch.long)
      y_8k, _ = encoder(x, ilens, fs=8000)
  
      x = torch.rand(1, 32000, dtype=torch.float32)
      y_32k, _ = encoder(x, ilens * 4, fs=32000)
  
      x = torch.rand(1, 16000, dtype=torch.float32)
      y_16k, flens = encoder(x, ilens * 2)
  
      assert y_16k.size(0) == y_8k.size(0) == y_32k.size(0)
      assert y_16k.size(1) == y_8k.size(1) == y_32k.size(1)
      assert y_16k.size(-1) == y_8k.size(-1) * 2 - 1
      assert y_32k.size(-1) == y_16k.size(-1) * 2 - 1
  
imports: import pytest
  import torch
  from packaging.version import parse
  from espnet2.enh.encoder.stft_encoder import STFTEncoder
label_desc: Use image node_id 3 for calling a global function with example usage: test_STFTEncoder_reconfig_for_fs() without return types