code: def test_pure(client):
      N = 10
      with client.get_executor() as e:
          fs = [e.submit(get_random) for i in range(N)]
          res = [fut.result() for fut in as_completed(fs)]
          assert len(set(res)) < len(res)
      with client.get_executor(pure=False) as e:
          fs = [e.submit(get_random) for i in range(N)]
          res = [fut.result() for fut in as_completed(fs)]
          assert len(set(res)) == len(res)
  
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 10 for calling a global function with example usage: test_pure(client) without return types