code: def test_parallel_wavegan_compatibility():
      from parallel_wavegan.models import (
          MelGANGenerator as PWGMelGANGenerator,
      )
  
      model_pwg = PWGMelGANGenerator(**make_melgan_generator_args())
      model_espnet2 = MelGANGenerator(**make_melgan_generator_args())
      model_espnet2.load_state_dict(model_pwg.state_dict())
      model_pwg.eval()
      model_espnet2.eval()
  
      with torch.no_grad():
          c = torch.randn(5, 80)
          out_pwg = model_pwg.inference(c)
          out_espnet2 = model_espnet2.inference(c)
          np.testing.assert_array_equal(
              out_pwg.cpu().numpy(),
              out_espnet2.cpu().numpy(),
          )
  
file_path: espnet/test/espnet2/gan_tts/melgan/test_melgan.py
imports: import numpy
  import pytest
  import torch
  from espnet2.gan_tts.hifigan.loss import DiscriminatorAdversarialLoss, FeatureMatchLoss, GeneratorAdversarialLoss
  from espnet2.gan_tts.melgan import MelGANGenerator, MelGANMultiScaleDiscriminator
label_desc: Use image node_id 4 for calling a global function with example usage: test_parallel_wavegan_compatibility() without return types