code: def test_submit(client):
      with client.get_executor() as e:
          f1 = e.submit(slowadd, 1, 2)
          assert isinstance(f1, Future)
          f2 = e.submit(slowadd, 3, y=4)
          f3 = e.submit(throws, "foo")
          f4 = e.submit(slowadd, x=5, y=6)
          assert f1.result() == 3
          assert f2.result() == 7
          with pytest.raises(RuntimeError):
              f3.result()
          assert f4.result() == 11
  
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 2 for calling a global function with example usage: test_submit(client) without return types