code: def test_topology_graph_build_linear(linear_graph_dict):
      graph = TopologyGraph(linear_graph_dict)
      assert [node.name for node in graph.origin_nodes] == [
          "deployment0"
      ]
      node_deployment0 = graph.origin_nodes[0]
      assert node_deployment0.name == "deployment0"
      assert node_deployment0.number_of_parts == 1
      assert len(node_deployment0.outgoing_nodes) == 1
      assert not node_deployment0.floating
  
      node_deployment1 = node_deployment0.outgoing_nodes[0]
      assert node_deployment1.name == "deployment1"
      assert node_deployment1.number_of_parts == 1
      assert len(node_deployment1.outgoing_nodes) == 1
      assert not node_deployment1.floating
  
      node_deployment2 = node_deployment1.outgoing_nodes[0]
      assert node_deployment2.name == "deployment2"
      assert node_deployment2.number_of_parts == 1
      assert len(node_deployment2.outgoing_nodes) == 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 == "__end_gateway__"
      )
      assert not node_deployment3.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 8 for calling a global function with example usage: test_topology_graph_build_linear(linear_graph_dict) without return types