code: def test_sleep_checkpointing(workflow_start_regular_shared):
      """Test that the workflow sleep only starts after `run` not when the task is
      defined."""
      sleep_task = workflow.sleep(2)
      time.sleep(2)
      start_time = time.time()
      workflow.run(sleep_task)
      end_time = time.time()
      duration = end_time - start_time
      assert 1 < duration
  
file_path: ray/python/ray/workflow/tests/test_events.py
imports: import asyncio
  import time
  import pytest
  import ray
  from ray import workflow
  from ray.tests.conftest import *
  from ray.workflow.tests import utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_sleep_checkpointing(workflow_start_regular_shared) without return types