code: def cancel(workflow_id: str) -> None:
      """Cancel a workflow. Workflow checkpoints will still be saved in storage. To
         clean up saved checkpoints, see `workflow.delete()`.
  
      Args:
          workflow_id: The workflow to cancel.
  
      Examples:
          .. testcode::
  
              from ray import workflow
  
              @ray.remote
              def some_job():
                 return 1
  
              workflow_task = some_job.bind()
              workflow.run(workflow_task, workflow_id="some_job")
              workflow.cancel(workflow_id="some_job")
              assert workflow.get_status("some_job") == workflow.CANCELED
  
      Returns:
          None
  
      """
      _ensure_workflow_initialized()
      if not isinstance(workflow_id, str):
          raise TypeError("workflow_id has to be a string type.")
      workflow_manager = workflow_access.get_management_actor()
      ray.get(workflow_manager.cancel_workflow.remote(workflow_id))
  
imports: import functools
  import logging
  import tempfile
  from typing import Dict, Set, List, Tuple, Union, Optional, Any
  import time
  import uuid
  from pathlib import Path
  import ray
  from ray.dag import DAGNode
  from ray.dag.input_node import DAGInputData
  from ray.remote_function import RemoteFunction
  from ray.workflow.common import WorkflowStatus, Event, asyncio_run, validate_user_metadata
  from ray.workflow import serialization, workflow_access, workflow_context
  from ray.workflow.event_listener import EventListener, EventListenerType, TimerListener
  from ray.workflow.workflow_storage import WorkflowStorage
  from ray.workflow.workflow_state_from_dag import workflow_state_from_dag
  from ray.util.annotations import PublicAPI
  from ray._private.usage import usage_lib
label_desc: Use image node_id 16 for calling a global function with example usage: cancel(workflow_id) without return types