code: def test_error_calculator_nospace(tmpdir):
      from espnet.nets.e2e_asr_common import ErrorCalculator
  
      space = "<space>"
      blank = "<blank>"
      char_list = [blank, "a", "e", "i", "o", "u"]
      ys_pad = [
          np.random.randint(0, len(char_list), x)
          for x in range(120, 150, 5)
      ]
      ys_hat = [
          np.random.randint(0, len(char_list), x)
          for x in range(120, 150, 5)
      ]
      cer, wer = True, True
  
      ec = ErrorCalculator(char_list, space, blank, cer, wer)
  
      cer_ctc_val = ec(ys_pad, ys_hat, is_ctc=True)
      _cer, _wer = ec(ys_pad, ys_hat)
      assert cer_ctc_val is not None
      assert _cer is not None
      assert _wer is not None
  
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 8 for calling a global function with example usage: test_error_calculator_nospace(tmpdir) without return types