code: def test_topological_sort():
      # Example randomly generated with
      # https://www.cs.usfca.edu/~galles/visualization/TopoSortDFS.html
      graph = DiGraph()
      for node in range(8):
          graph.add_node(node)
  
      graph.add_edge(0, 2)
      graph.add_edge(0, 3)
      graph.add_edge(2, 4)
      graph.add_edge(2, 6)
      graph.add_edge(4, 7)
      graph.add_edge(6, 7)
      graph.add_edge(3, 5)
      graph.add_edge(1, 5)
      graph.add_edge(3, 7)
  
      assert graph.topological_sort() == [1, 0, 3, 5, 2, 6, 4, 7]
  
file_path: baikal/tests/_core/test_digraph.py
imports: import pytest
  from baikal._core.digraph import DiGraph, NodeNotFoundError, CyclicDiGraphError
label_desc: Use image node_id 11 for calling a global function with example usage: test_topological_sort() without return types