code: def test_floating_executors(tmpdir, protocol):
      NUM_REQ = 20
      file_name = os.path.join(str(tmpdir), "file.txt")
      expected_str = "here " * NUM_REQ
  
      f = (
          Flow(protocol=protocol)
          .add(name="first")
          .add(
              name="second",
              floating=True,
              uses=FloatingTestExecutor,
              uses_with={"file_name": file_name},
          )
      )
  
      with f:
          for j in range(NUM_REQ):
              start_time = time.time()
              ret = f.post(
                  on=__default_endpoint__, inputs=DocumentArray.empty(1)
              )
              end_time = time.time()
              assert (
                  end_time - start_time
              ) < TIME_SLEEP_FLOATING  # check that the response arrives before the
              # Floating Executor finishes
              assert len(ret) == 1
              assert ret[0].text == ""
  
      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 1 for calling a global function with example usage: test_floating_executors(tmpdir, protocol) without return types