code: def test_headless_exec_timeout(port_generator, protocol):
      exec_port = port_generator()
      flow_kwargs = {"timeout_send": 1, "protocol": protocol}
      add_kwargs = {"uses": SlowExecutor, "port": exec_port}
  
      # we have to do this in a new process because otherwise grpc will be sad and everything will crash :(
      p = multiprocessing.Process(
          target=_test_error, args=(flow_kwargs, add_kwargs, exec_port)
      )
      p.start()
      p.join()
      assert p.exitcode == 0
  
file_path: jina/tests/integration/gateway_clients/test_executor_timeout_failures.py
imports: import multiprocessing
  import time
  import pytest
  from jina import Executor, Flow, requests
label_desc: Use image node_id 2 for calling a global function with example usage: test_headless_exec_timeout(port_generator, protocol) without return types