code: def assert_task_checkpoints(wf_storage, task_id, mode: str):
      """Assert the checkpoint status of a workflow task."""
      result = wf_storage.inspect_task(task_id)
      if mode == "all_skipped":
          assert not result.output_object_valid
          assert result.output_task_id is None
          assert not result.args_valid
          assert not result.func_body_valid
          assert not result.task_options
      elif mode == "output_skipped":
          assert not result.output_object_valid
          assert result.output_task_id is None
          assert result.args_valid
          assert result.func_body_valid
          assert result.task_options is not None
      elif mode == "checkpointed":
          assert (
              result.output_object_valid
              or result.output_task_id is not None
          )
      else:
          raise ValueError("Unknown mode.")
  
file_path: ray/python/ray/workflow/tests/utils.py
imports: import pathlib
  import tempfile
label_desc: Use image node_id 6 for calling a global function with example usage: assert_task_checkpoints(wf_storage, task_id, mode) without return types