code: def test_ref_in_handle_input(serve_instance):
      # https://github.com/ray-project/ray/issues/12593
  
      unblock_worker_signal = SignalActor.remote()
  
      @serve.deployment
      async def blocked_by_ref(data):
          assert not isinstance(data, ray.ObjectRef)
  
      handle = serve.run(blocked_by_ref.bind())
  
      # Pass in a ref that's not ready yet
      ref = unblock_worker_signal.wait.remote()
      worker_result = handle.remote(ref)
  
      # Worker shouldn't execute the request
      with pytest.raises(TimeoutError):
          worker_result.result(timeout_s=1)
  
      # Now unblock the worker
      unblock_worker_signal.send.remote()
      worker_result.result()
  
imports: import asyncio
  import gc
  import sys
  import numpy
  import pytest
  import requests
  from fastapi import FastAPI
  from fastapi.responses import JSONResponse
  import ray
  from ray import serve
  from ray._private.test_utils import SignalActor
  from ray.serve.context import _get_global_client
  from ray.serve.handle import DeploymentHandle
label_desc: Use image node_id 5 for calling a global function with example usage: test_ref_in_handle_input(serve_instance) without return types