code: def test_load_inputs_and_targets_legacy_format(tmpdir):
      # batch = [("F01_050C0101_PED_REAL",
      #          {"input": [{"feat": "some/path.ark:123"}],
      #           "output": [{"tokenid": "1 2 3 4"}],
      ark = str(tmpdir.join("test.ark"))
      scp = str(tmpdir.join("test.scp"))
  
      desire_xs = []
      desire_ys = []
      with kaldiio.WriteHelper("ark,scp:{},{}".format(ark, scp)) 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.append(x)
              desire_ys.append(np.array([1, 2, 3, 4]))
  
      batch = []
      with open(scp, "r") as f:
          for line in f:
              uttid, path = line.strip().split()
              batch.append(
                  (
                      uttid,
                      {
                          "input": [{"feat": path, "name": "input1"}],
                          "output": [
                              {"tokenid": "1 2 3 4", "name": "target1"}
                          ],
                      },
                  )
              )
  
      load_inputs_and_targets = LoadInputsAndTargets()
      xs, ys = load_inputs_and_targets(batch)
      for x, xd in zip(xs, desire_xs):
          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 3 for calling a global function with example usage: test_load_inputs_and_targets_legacy_format(tmpdir) without return types