code: def test_basic(serve_instance):
      @serve.deployment
      def downstream():
          return "hello"
  
      @serve.deployment
      class Deployment:
          def __init__(self, handle: DeploymentHandle):
              self._handle = handle
              assert isinstance(self._handle, DeploymentHandle)
              self._old_handle = handle.options(
                  use_new_handle_api=False
              )
              assert isinstance(self._old_handle, RayServeHandle)
  
          async def __call__(self):
              response = self._handle.remote()
              assert isinstance(response, DeploymentResponse)
              val = await response
  
              ref = await self._old_handle.remote()
              assert isinstance(ref, ray.ObjectRef)
              old_val = await ref
  
              assert val == old_val
  
              return val
  
      handle: DeploymentHandle = serve.run(
          Deployment.bind(downstream.bind())
      )
      assert isinstance(handle, DeploymentHandle)
      assert handle.remote().result() == "hello"
      old_handle = handle.options(use_new_handle_api=False)
      assert isinstance(old_handle, RayServeSyncHandle)
      assert ray.get(old_handle.remote()) == "hello"
  
file_path: ray/python/ray/serve/tests/test_new_handle_api.py
imports: import sys
  from typing import Any
  import pytest
  import ray
  from ray import serve
  from ray._private.test_utils import SignalActor
  from ray.serve.handle import DeploymentHandle, DeploymentResponse, DeploymentResponseGenerator, RayServeHandle, RayServeSyncHandle
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic(serve_instance) and returns: str, val