code: def test_delete_application(serve_instance):
      """Test delete single application"""
  
      @serve.deployment
      def f():
          return "got f"
  
      @serve.deployment
      def g():
          return "got g"
  
      f_handle = serve.run(f.bind(), name="app_f").options(
          use_new_handle_api=True,
      )
      g_handle = serve.run(
          g.bind(), name="app_g", route_prefix="/app_g"
      ).options(
          use_new_handle_api=True,
      )
      assert f_handle.remote().result() == "got f"
      assert requests.get("http://127.0.0.1:8000/").text == "got f"
  
      serve.delete("app_f")
      assert (
          "Path '/' not found"
          in requests.get("http://127.0.0.1:8000/").text
      )
  
      # delete again, no exception & crash expected.
      serve.delete("app_f")
  
      # make sure no affect to app_g
      assert g_handle.remote().result() == "got g"
      assert requests.get("http://127.0.0.1:8000/app_g").text == "got g"
  
imports: import asyncio
  import os
  import sys
  from typing import Dict, Optional
  import pytest
  import requests
  import starlette.responses
  from fastapi import FastAPI
  import ray
  from ray import serve
  from ray._private.pydantic_compat import BaseModel, ValidationError
  from ray._private.test_utils import SignalActor, wait_for_condition
  from ray.serve._private.api import call_app_builder_with_args_if_necessary
  from ray.serve._private.common import DeploymentID
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME
  from ray.serve.deployment import Application
  from ray.serve.exceptions import RayServeException
  from ray.serve.handle import DeploymentHandle, RayServeHandle
label_desc: Use image node_id 20 for calling a global function with example usage: test_delete_application(serve_instance) and returns: str, str