code: def test_deployment_name_with_app_name(serve_instance):
      """Test replica name with app name as prefix"""
  
      controller = serve_instance._controller
  
      @serve.deployment
      def g():
          return "got g"
  
      serve.run(g.bind())
      deployment_info = ray.get(
          controller._all_running_replicas.remote()
      )
      assert (
          DeploymentID("g", SERVE_DEFAULT_APP_NAME) in deployment_info
      )
  
      @serve.deployment
      def f():
          return "got f"
  
      serve.run(f.bind(), route_prefix="/f", name="app1")
      deployment_info = ray.get(
          controller._all_running_replicas.remote()
      )
      assert DeploymentID("f", "app1") in deployment_info
  
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 21 for calling a global function with example usage: test_deployment_name_with_app_name(serve_instance) and returns: str, str