code: def test_func_return_():
      class MyExecutor(Executor):
          @requests
          def foo(self, **kwargs):
              return DocumentArray([Document(), Document()])
  
      port = random_port()
      f = Flow(port=port).add(uses=MyExecutor)
  
      with f:
          ret = Client(port=f.port).post(
              on="/some_endpoint",
              inputs=[Document() for _ in range(3)],
              parameters={"hello": "world", "topk": 10},
          )
      assert len(ret) == 2
  
file_path: jina/tests/integration/v2_api/test_func_routing.py
imports: from jina import Client, Document, DocumentArray, Executor, Flow, requests
  from jina.helper import random_port
label_desc: Use image node_id 4 for calling a global function with example usage: test_func_return_() and returns: DocumentArray