code: def test_topology_graph_build_complete(complete_graph_dict):
      graph = TopologyGraph(complete_graph_dict)
      assert set([node.name for node in graph.origin_nodes]) == {
          "deployment0",
          "deployment4",
          "deployment6",
      }
      node_names_list = [node.name for node in graph.origin_nodes]
  
      node_deployment0 = graph.origin_nodes[
          node_names_list.index("deployment0")
      ]
      assert node_deployment0.number_of_parts == 1
      assert not node_deployment0.floating
      outgoing_deployment0_list = [
          node.name for node in node_deployment0.outgoing_nodes
      ]
  
      node_deployment1 = node_deployment0.outgoing_nodes[
          outgoing_deployment0_list.index("deployment1")
      ]
      assert node_deployment1.number_of_parts == 1
      assert not node_deployment1.floating
      assert len(node_deployment1.outgoing_nodes) == 1
      assert (
          node_deployment1.outgoing_nodes[0].name == "__end_gateway__"
      )
  
      node_deployment2 = node_deployment0.outgoing_nodes[
          outgoing_deployment0_list.index("deployment2")
      ]
      assert len(node_deployment2.outgoing_nodes) == 1
      assert node_deployment2.number_of_parts == 1
      assert not node_deployment2.floating
  
      node_deployment3 = node_deployment2.outgoing_nodes[0]
      assert node_deployment3.name == "deployment3"
      assert node_deployment3.number_of_parts == 1
      assert len(node_deployment3.outgoing_nodes) == 1
      assert node_deployment3.outgoing_nodes[0].name == "merger"
      assert not node_deployment3.floating
  
      node_deployment4 = graph.origin_nodes[
          node_names_list.index("deployment4")
      ]
      assert node_deployment4.number_of_parts == 1
      assert len(node_deployment4.outgoing_nodes) == 1
      assert not node_deployment4.floating
  
      node_deployment5 = node_deployment4.outgoing_nodes[0]
      assert node_deployment5.number_of_parts == 1
      assert node_deployment5.name == "deployment5"
      assert len(node_deployment5.outgoing_nodes) == 1
      assert node_deployment5.outgoing_nodes[0].name == "merger"
      assert not node_deployment5.floating
  
      assert id(node_deployment3.outgoing_nodes[0]) == id(
          node_deployment5.outgoing_nodes[0]
      )
  
      merger_deployment = node_deployment3.outgoing_nodes[0]
      assert merger_deployment.name == "merger"
      assert len(merger_deployment.outgoing_nodes) == 1
      assert merger_deployment.number_of_parts == 2
      assert not merger_deployment.floating
  
      deployment_last_deployment = merger_deployment.outgoing_nodes[0]
      assert deployment_last_deployment.name == "deployment_last"
      assert len(deployment_last_deployment.outgoing_nodes) == 1
      assert (
          deployment_last_deployment.outgoing_nodes[0].name
          == "__end_gateway__"
      )
      assert deployment_last_deployment.number_of_parts == 1
      assert not deployment_last_deployment.floating
  
      node_deployment6 = graph.origin_nodes[
          node_names_list.index("deployment6")
      ]
      assert node_deployment6.name == "deployment6"
      assert node_deployment6.number_of_parts == 1
      assert len(node_deployment6.outgoing_nodes) == 0
      assert node_deployment6.floating
  
imports: import asyncio
  import copy
  from collections import defaultdict
  from typing import List
  import pytest
  from docarray import Document, DocumentArray
  from jina.serve.runtimes.gateway.graph.topology_graph import TopologyGraph
  from jina.types.request import Request
  from jina.types.request.data import DataRequest
label_desc: Use image node_id 12 for calling a global function with example usage: test_topology_graph_build_complete(complete_graph_dict) without return types