code: def test_correctness(use_stream):
      f = Flow().add(uses=PlaceholderExecutor)
      with f:
          with mp.Pool(2) as p:
              results = list(
                  p.map(
                      call_api,
                      [
                          RequestStruct(
                              f.port, "/bar", "ab", use_stream
                          ),
                          RequestStruct(
                              f.port, "/bar", "cd", use_stream
                          ),
                      ],
                  )
              )
              assert all([len(result) == 2 for result in results])
              assert [doc.text for doc in results[0]] == [
                  f"a{BAR_SUCCESS_MSG}",
                  f"b{BAR_SUCCESS_MSG}",
              ]
              assert [doc.text for doc in results[1]] == [
                  f"c{BAR_SUCCESS_MSG}",
                  f"d{BAR_SUCCESS_MSG}",
              ]
  
          with mp.Pool(2) as p:
              results = list(
                  p.map(
                      call_api,
                      [
                          RequestStruct(
                              f.port, "/foo", "ABC", use_stream
                          ),
                          RequestStruct(
                              f.port, "/foo", "AB", use_stream
                          ),
                      ],
                  )
              )
              assert [len(r) for r in results] == [3, 2]
              assert [doc.text for doc in results[0]] == [
                  f"A{FOO_SUCCESS_MSG}",
                  f"B{FOO_SUCCESS_MSG}",
                  f"C{FOO_SUCCESS_MSG}",
              ]
              assert [doc.text for doc in results[1]] == [
                  f"A{FOO_SUCCESS_MSG}",
                  f"B{FOO_SUCCESS_MSG}",
              ]
  
          # This is the only one that waits for timeout because its slow
          # But we should still test it at least once
          with mp.Pool(3) as p:
              results = list(
                  p.map(
                      call_api,
                      [
                          RequestStruct(
                              f.port, "/bar", "a", use_stream
                          ),
                          RequestStruct(
                              f.port, "/bar", "b", use_stream
                          ),
                          RequestStruct(
                              f.port, "/bar", "c", use_stream
                          ),
                      ],
                  )
              )
              assert all([len(result) == 1 for result in results])
              assert [doc.text for doc in results[0]] == [
                  f"a{BAR_SUCCESS_MSG}"
              ]
              assert [doc.text for doc in results[1]] == [
                  f"b{BAR_SUCCESS_MSG}"
              ]
              assert [doc.text for doc in results[2]] == [
                  f"c{BAR_SUCCESS_MSG}"
              ]
  
imports: import asyncio
  import multiprocessing
  import multiprocessing
  import os
  import signal
  import time
  from collections import namedtuple
  import pytest
  from jina import Client, Document, DocumentArray, Executor, Flow, Deployment, dynamic_batching, requests
  from jina.clients.request import request_generator
  from jina.serve.networking.utils import send_request_sync
  from jina.serve.runtimes.servers import BaseServer
  from jina_cli.api import executor_native
  from jina.proto import jina_pb2
  from tests.helper import _generate_pod_args
label_desc: Use image node_id 5 for calling a global function with example usage: test_correctness(use_stream) without return types