code: def test_load_inputs_and_targets_legacy_format_multi_inputs(tmpdir):
      # batch = [("F01_050C0101_PED_REAL",
      #          {"input": [{"feat": "some/path1.ark:123",
      #                      "name": "input1"}
      #                     {"feat": "some/path2.ark:123"
      #                      "name": "input2"}],
      #           "output": [{"tokenid": "1 2 3 4"}],
      ark_1 = str(tmpdir.join("test_1.ark"))
      scp_1 = str(tmpdir.join("test_1.scp"))
  
      ark_2 = str(tmpdir.join("test_2.ark"))
      scp_2 = str(tmpdir.join("test_2.scp"))
  
      desire_xs_1 = []
      desire_xs_2 = []
      desire_ys = []
      with kaldiio.WriteHelper(
          "ark,scp:{},{}".format(ark_1, scp_1)
      ) as f:
          for i in range(10):
              x = np.random.random((100, 100)).astype(np.float32)
              uttid = "uttid{}".format(i)
              f[uttid] = x
              desire_xs_1.append(x)
              desire_ys.append(np.array([1, 2, 3, 4]))
  
      with kaldiio.WriteHelper(
          "ark,scp:{},{}".format(ark_2, scp_2)
      ) as f:
          for i in range(10):
              x = np.random.random((100, 100)).astype(np.float32)
              uttid = "uttid{}".format(i)
              f[uttid] = x
              desire_xs_2.append(x)
              desire_ys.append(np.array([1, 2, 3, 4]))
  
      batch = []
      with open(scp_1, "r") as f:
          lines_1 = f.readlines()
      with open(scp_2, "r") as f:
          lines_2 = f.readlines()
  
      for line_1, line_2 in zip(lines_1, lines_2):
          uttid, path_1 = line_1.strip().split()
          uttid, path_2 = line_2.strip().split()
          batch.append(
              (
                  uttid,
                  {
                      "input": [
                          {"feat": path_1, "name": "input1"},
                          {"feat": path_2, "name": "input2"},
                      ],
                      "output": [
                          {"tokenid": "1 2 3 4", "name": "target1"}
                      ],
                  },
              )
          )
  
      load_inputs_and_targets = LoadInputsAndTargets()
      xs_1, xs_2, ys = load_inputs_and_targets(batch)
      for x, xd in zip(xs_1, desire_xs_1):
          np.testing.assert_array_equal(x, xd)
      for x, xd in zip(xs_2, desire_xs_2):
          np.testing.assert_array_equal(x, xd)
      for y, yd in zip(ys, desire_ys):
          np.testing.assert_array_equal(y, yd)
  
file_path: espnet/test/test_utils.py
imports: from test.utils_test import make_dummy_json
  import h5py
  import kaldiio
  import numpy
  import pytest
  from espnet.utils.io_utils import LoadInputsAndTargets, SoundHDF5File
  from espnet.utils.training.batchfy import make_batchset
label_desc: Use image node_id 4 for calling a global function with example usage: test_load_inputs_and_targets_legacy_format_multi_inputs(tmpdir) without return types