code: def save_infer_res(config, logits, preds):
      """Save the result of inference."""
      res_file = config["data"]["infer"]["res"]
      res_dir = os.path.dirname(res_file)
      if not os.path.exists(res_dir):
          os.makedirs(res_dir)
      logging.info("Save inference result to: {}".format(res_file))
      with open(res_file, "w") as in_f:
          for logit, pred in zip(logits, preds):
              in_f.write(
                  " ".join(["{:.3f}".format(num) for num in logit])
                  + "\t{}\n".format(pred)
              )
  
file_path: delta/delta/utils/solver/utils/solver_utils.py
imports: import os
  import re
  from pathlib import Path
  import numpy
  import delta.compat
  from absl import logging
  import shutil
  from delta import utils
  from delta.utils import metrics
label_desc: Use image node_id 5 for calling a global function with example usage: save_infer_res(config, logits, preds) without return types