code: def test_torch_save_and_load():
      args = make_arg()
      model = th_asr.E2E(10, 5, args)
      # initialize randomly
      for p in model.parameters():
          p.data.uniform_()
      if not os.path.exists(".pytest_cache"):
          os.makedirs(".pytest_cache")
      tmppath = tempfile.mktemp()
      asr_utils.torch_save(tmppath, model)
      p_saved = [p.data.numpy() for p in model.parameters()]
      # set constant value
      for p in model.parameters():
          p.data.zero_()
      asr_utils.torch_load(tmppath, model)
      for p1, p2 in zip(p_saved, model.parameters()):
          np.testing.assert_array_equal(p1, p2.data.numpy())
      if os.path.exists(tmppath):
          os.remove(tmppath)
  
imports: from __future__ import division
  import argparse
  import importlib
  import os
  import tempfile
  from test.utils_test import make_dummy_json
  import chainer
  import numpy
  import pytest
  import torch
  import espnet.nets.chainer_backend.e2e_asr
  import espnet.nets.pytorch_backend.e2e_asr
  from espnet.asr import asr_utils
  from espnet.nets.pytorch_backend.nets_utils import pad_list
  from espnet.nets.pytorch_backend.streaming.segment import SegmentStreamingE2E
  from espnet.nets.pytorch_backend.streaming.window import WindowStreamingE2E
  from espnet.utils.training.batchfy import make_batchset
label_desc: Use image node_id 19 for calling a global function with example usage: test_torch_save_and_load() without return types