code: def test_parallel_wavegan_compatibility():
      from parallel_wavegan.models import (
          ParallelWaveGANGenerator as PWGParallelWaveGANGenerator,
      )
  
      model_pwg = PWGParallelWaveGANGenerator(**make_generator_args())
      model_espnet2 = ParallelWaveGANGenerator(**make_generator_args())
      model_espnet2.load_state_dict(model_pwg.state_dict())
      model_pwg.eval()
      model_espnet2.eval()
      # NOTE(kan-bayashi): Use float64 to avoid numerical error in CI
      dtype = torch.float64
      model_pwg.to(dtype=dtype)
      model_espnet2.to(dtype=dtype)
  
      with torch.no_grad():
          z = torch.randn(3 * 16, 1, dtype=dtype)
          c = torch.randn(3, 10, dtype=dtype)
          out_pwg = model_pwg.inference(c, z)
          out_espnet2 = model_espnet2.inference(c, z)
          np.testing.assert_allclose(
              out_pwg.cpu().numpy(),
              out_espnet2.cpu().numpy(),
              rtol=1e-5,
          )
  
file_path: espnet/test/espnet2/gan_tts/parallel_wavegan/test_parallel_wavegan.py
imports: import numpy
  import pytest
  import torch
  from espnet2.gan_tts.hifigan.loss import DiscriminatorAdversarialLoss, GeneratorAdversarialLoss
  from espnet2.gan_tts.parallel_wavegan import ParallelWaveGANDiscriminator, ParallelWaveGANGenerator
label_desc: Use image node_id 4 for calling a global function with example usage: test_parallel_wavegan_compatibility() without return types