code: def score_with_sctk(sctk_dir, ref_fname, hyp_fname, out_dir, glm=""):
      sclite_path = os.path.join(sctk_dir, "bin", "sclite")
      if not os.path.exists(sclite_path):
          raise FileNotFoundError(
              errno.ENOENT, os.strerror(errno.ENOENT), sclite_path
          )
      # apply glm
      if os.path.exists(glm):
          rfilter_path = os.path.join(sctk_dir, "bin", "rfilter1")
          if not os.path.exists(rfilter_path):
              raise FileNotFoundError(
                  errno.ENOENT, os.strerror(errno.ENOENT), rfilter_path
              )
          hypglm = (
              os.path.join(out_dir, os.path.basename(hyp_fname))
              + ".glm"
          )
          rfilt_cmd = [rfilter_path] + [glm]
          with open(hypglm, "w", encoding="utf-8") as hypf, open(
              hyp_fname, "r", encoding="utf-8"
          ) as hyp_in:
              subprocess.run(rfilt_cmd, stdin=hyp_in, stdout=hypf)
          refglm = (
              os.path.join(out_dir, os.path.basename(ref_fname))
              + ".glm"
          )
          with open(refglm, "w", encoding="utf-8") as reff, open(
              ref_fname, "r", encoding="utf-8"
          ) as ref_in:
              subprocess.run(rfilt_cmd, stdin=ref_in, stdout=reff)
      else:
          refglm = ref_fname
          hypglm = hyp_fname
  
      _ = subprocess.check_output(
          f"{sclite_path} -h {hypglm}  -r {refglm} -i wsj -o all",
          shell=True,
      )
  
file_path: NeMo/examples/asr/experimental/sclite/speech_to_text_sclite.py
imports: import errno
  import json
  import os
  import subprocess
  from argparse import ArgumentParser
  import torch
  from nemo.collections.asr.models import ASRModel
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: score_with_sctk(sctk_dir, ref_fname, hyp_fname, out_dir, glm) without return types