code: def test_workspace_executor_failed_status(
      dvc, scm, failed_exp_stage, queue_type
  ):
      queue = getattr(dvc.experiments, queue_type)
      queue.put(
          params={"params.yaml": ["foo=1"]},
          targets=failed_exp_stage.addressing,
          name="failed",
      )
      entry, executor = queue.get()
      name = queue._EXEC_NAME or entry.stash_rev
      infofile = queue.get_infofile_path(name)
      rev = entry.stash_rev
  
      with pytest.raises(ReproductionError):
          executor.reproduce(
              info=executor.info,
              rev=rev,
              infofile=infofile,
          )
      executor_info = ExecutorInfo.load_json(infofile)
      assert executor_info.status == TaskStatus.FAILED
  
      cleanup_exp.s(executor, infofile)()
      if queue_type == "workspace_queue":
          assert not os.path.exists(infofile)
      else:
          executor_info = ExecutorInfo.load_json(infofile)
          assert executor_info.status == TaskStatus.FAILED
  
file_path: dvc/tests/unit/repo/experiments/test_executor_status.py
imports: import os
  import pytest
  from dvc.exceptions import ReproductionError
  from dvc.repo.experiments.executor.base import ExecutorInfo, TaskStatus
  from dvc.repo.experiments.queue.tasks import cleanup_exp, collect_exp, setup_exp
label_desc: Use image node_id 4 for calling a global function with example usage: test_workspace_executor_failed_status(dvc, scm, failed_exp_stage, queue_type) without return types