code: def test_floating_needs(needs, tmpdir):
      NUM_REQ = 20
      file_name = os.path.join(str(tmpdir), "file.txt")
      expected_str = "here " * NUM_REQ
  
      class FastChangingExecutor(Executor):
          @requests()
          def foo(self, docs, **kwargs):
              for doc in docs:
                  doc.text = "Hello World"
  
      f = (
          Flow()
          .add(name="executor0", uses=FastChangingExecutor)
          .add(
              name="floating_executor",
              uses=FloatingTestExecutor,
              uses_with={"file_name": file_name},
              needs=[needs],
              floating=True,
          )
      )
      with f:
          for j in range(NUM_REQ):
              start_time = time.time()
              response = f.post(
                  on="/endpoint", inputs=DocumentArray.empty(2)
              )
              end_time = time.time()
              assert (end_time - start_time) < TIME_SLEEP_FLOATING
              assert response.texts == ["Hello World", "Hello World"]
  
      with open(file_name, "r", encoding="utf-8") as f:
          resulted_str = f.read()
  
      assert resulted_str == expected_str
  
file_path: jina/tests/integration/floating_deployments/test_floating_deployments.py
imports: import os
  import time
  import pytest
  from jina import DocumentArray, Executor, Flow, requests
  from jina.constants import __default_endpoint__
label_desc: Use image node_id 5 for calling a global function with example usage: test_floating_needs(needs, tmpdir) without return types