code: def test_cancellation_wait(client):
      with client.get_executor(pure=False) as e:
          fs = [e.submit(slowinc, i, delay=0.2) for i in range(10)]
          fs[3].cancel()
          res = wait(fs, return_when=FIRST_COMPLETED, timeout=30)
          assert len(res.not_done) > 0
          assert len(res.done) >= 1
  
          assert fs[3] in res.done
          assert fs[3].cancelled()
  
imports: from __future__ import annotations
  import random
  from concurrent.futures import FIRST_COMPLETED, FIRST_EXCEPTION, Future, TimeoutError, as_completed, wait
  from time import sleep
  import pytest
  from tlz import take
  from distributed.event import Event
  from distributed.metrics import time
  from distributed.utils import CancelledError
  from distributed.utils_test import inc, slowadd, slowinc, throws, varying
label_desc: Use image node_id 6 for calling a global function with example usage: test_cancellation_wait(client) without return types