code: def test_initialization(model_dict):
      # make args
      idim, odim = 10, 25
      teacher_model_args = make_transformer_args(**model_dict)
      model_args = make_feedforward_transformer_args(**model_dict)
  
      # define teacher model and save it
      teacher_model = Transformer(
          idim, odim, Namespace(**teacher_model_args)
      )
      tmpdir = tempfile.mkdtemp(prefix="tmp_", dir="/tmp")
      torch.save(
          teacher_model.state_dict(), tmpdir + "/model.dummy.best"
      )
      with open(tmpdir + "/model.json", "wb") as f:
          f.write(
              json.dumps(
                  (idim, odim, teacher_model_args),
                  indent=4,
                  ensure_ascii=False,
                  sort_keys=True,
              ).encode("utf_8")
          )
  
      # define model
      model_args["teacher_model"] = tmpdir + "/model.dummy.best"
      model = FeedForwardTransformer(
          idim, odim, Namespace(**model_args)
      )
  
      # check initialization
      if model_args["transferred_encoder_module"] == "all":
          for p1, p2 in zip(
              model.encoder.parameters(),
              model.teacher.encoder.parameters(),
          ):
              np.testing.assert_array_equal(
                  p1.data.cpu().numpy(), p2.data.cpu().numpy()
              )
      else:
          np.testing.assert_array_equal(
              model.encoder.embed[0].weight.data.cpu().numpy(),
              model.teacher.encoder.embed[0].weight.data.cpu().numpy(),
          )
  
      # remove tmpdir
      if os.path.exists(tmpdir):
          shutil.rmtree(tmpdir)
  
imports: import json
  import os
  import shutil
  import tempfile
  from argparse import Namespace
  import numpy
  import pytest
  import torch
  from espnet.nets.pytorch_backend.e2e_tts_fastspeech import FeedForwardTransformer
  from espnet.nets.pytorch_backend.e2e_tts_tacotron2 import Tacotron2
  from espnet.nets.pytorch_backend.e2e_tts_transformer import Transformer
  from espnet.nets.pytorch_backend.fastspeech.duration_calculator import DurationCalculator
  from espnet.nets.pytorch_backend.fastspeech.length_regulator import LengthRegulator
  from espnet.nets.pytorch_backend.nets_utils import pad_list
label_desc: Use image node_id 8 for calling a global function with example usage: test_initialization(model_dict) without return types