code: def _set_result_unless_cancelled(fut, result):
      """Helper setting the result only if the future was not cancelled."""
      if fut.cancelled():
          return
      fut.set_result(result)
  
imports: import concurrent.futures
  import contextvars
  import logging
  import sys
  from types import GenericAlias
  from .None import base_futures
  from .None import events
  from .None import exceptions
  from .None import format_helpers
label_desc: Use image node_id 2 for calling a global function with example usage: _set_result_unless_cancelled(fut, result) without return types