code: def test_loss(etype):
      # ch = importlib.import_module('espnet.nets.chainer_backend.e2e_mt')
      th = importlib.import_module("espnet.nets.pytorch_backend.e2e_mt")
      args = make_arg(etype=etype)
      th_model = th.E2E(6, 5, args)
  
      const = 1e-4
      init_torch_weight_const(th_model, const)
  
      th_batch = prepare_inputs("pytorch")
  
      th_model(*th_batch)
      th_att = th_model.loss
  
      th_model.zero_grad()
  
      th_model(*th_batch)
      th_att = th_model.loss
      th_att.backward()
  
imports: from __future__ import division
  import argparse
  import importlib
  import os
  import tempfile
  from test.utils_test import make_dummy_json_mt
  import chainer
  import numpy
  import pytest
  import torch
  from espnet.nets.pytorch_backend.nets_utils import pad_list
  from espnet.utils.training.batchfy import make_batchset
label_desc: Use image node_id 9 for calling a global function with example usage: test_loss(etype) without return types