code: def test_parallel_wavegan_compatibility():
      from parallel_wavegan.models import (
          HiFiGANGenerator as PWGHiFiGANGenerator,
      )
  
      model_pwg = PWGHiFiGANGenerator(**make_hifigan_generator_args())
      model_espnet2 = HiFiGANGenerator(**make_hifigan_generator_args())
      model_espnet2.load_state_dict(model_pwg.state_dict())
      model_pwg.eval()
      model_espnet2.eval()
  
      with torch.no_grad():
          c = torch.randn(3, 5)
          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/hifigan/test_hifigan.py
imports: import numpy
  import pytest
  import torch
  from espnet2.gan_tts.hifigan import HiFiGANGenerator, HiFiGANMultiScaleMultiPeriodDiscriminator
  from espnet2.gan_tts.hifigan.loss import DiscriminatorAdversarialLoss, FeatureMatchLoss, GeneratorAdversarialLoss, MelSpectrogramLoss
label_desc: Use image node_id 5 for calling a global function with example usage: test_parallel_wavegan_compatibility() without return types