code: def test_shared_deployment_handle(serve_instance):
      """
      Test we can re-use the same deployment handle multiple times or in
      multiple places, without incorrectly parsing duplicated deployments.
      """
      m = Model.bind(2)
      ray_dag = Combine.bind(m, m2=m)
  
      with _DAGNodeNameGenerator() as node_name_generator:
          serve_root_dag = ray_dag.apply_recursive(
              lambda node: transform_ray_dag_to_serve_dag(
                  node, node_name_generator, ""
              )
          )
      print(f"Serve DAG: \n{serve_root_dag}")
      deployments = extract_deployments_from_serve_dag(serve_root_dag)
      assert len(deployments) == 2
      for deployment in deployments:
          deployment._deploy()
  
      _validate_consistent_python_output(
          deployments[1], ray_dag, "Combine", input=1, output=4
      )
  
file_path: ray/python/ray/serve/tests/test_deployment_graph_build.py
imports: import pytest
  import requests
  import ray
  from ray import serve
  from ray.dag.utils import _DAGNodeNameGenerator
  from ray.serve._private import api
  from ray.serve._private.deployment_graph_build import extract_deployments_from_serve_dag, transform_ray_dag_to_serve_dag
  from ray.serve.handle import DeploymentHandle
  from ray.serve.tests.common.test_modules import NESTED_HANDLE_KEY, Combine, Model
label_desc: Use image node_id 5 for calling a global function with example usage: test_shared_deployment_handle(serve_instance) without return types