code: def _test_evaluate_cli(
      test_outputs: List[str], test_target_path: str
  ):
      """
      Runs sockeye-evaluate CLI with translations and a reference file.
      """
      with TemporaryDirectory(prefix="test_evaluate") as work_dir:
          # write temporary output file
          out_path = os.path.join(work_dir, "hypotheses")
          with open(out_path, "w") as fd:
              for output in test_outputs:
                  print(output["translation"], file=fd)
          # Run evaluate cli
          eval_params = "{} --hypotheses {hypotheses} --references {references} --metrics {metrics}".format(
              sockeye.evaluate.__file__,
              hypotheses=out_path,
              references=test_target_path,
              metrics="bleu chrf rouge1 ter",
          )
          with patch.object(sys, "argv", eval_params.split()):
              sockeye.evaluate.main()
  
imports: import logging
  import os
  import platform
  import sys
  from tempfile import TemporaryDirectory
  from typing import List
  from unittest.mock import patch
  import pytest
  import torch
  import sockeye.average
  import sockeye.checkpoint_decoder
  import sockeye.evaluate
  from sockeye import constants
  from sockeye.config import Config
  from sockeye.model import load_model
  from sockeye.test_utils import run_train_translate, tmp_digits_dataset
  from test.common import check_train_translate
label_desc: Use image node_id 3 for calling a global function with example usage: _test_evaluate_cli(test_outputs, test_target_path) without return types