code: def toposort(graph: Dict[str, List[str]]) -> List[str]:
      """Topological sort of a directed acyclic graph.
  
      Parameters
      ----------
      graph : dict of lists
          Mapping of node labels to list of child node labels.
          This is assumed to represent a graph with no cycles.
  
      Returns
      -------
      order : list
          topological order of input graph.
      """
      # Once we drop support for Python 3.8, this can potentially be replaced
      # with graphlib.TopologicalSorter from the standard library.
      stack: List[str] = []
      visited: Dict[str, Literal[True]] = {}
  
      def visit(nodes):
          for node in sorted(nodes, reverse=True):
              if not visited.get(node):
                  visited[node] = True
                  visit(graph.get(node, []))
                  stack.insert(0, node)
  
      visit(graph)
      return stack
  
imports: import argparse
  import copy
  import json
  import os
  import re
  import sys
  import textwrap
  from dataclasses import dataclass
  from os.path import abspath, dirname, join
  from typing import Dict, Final, List, Literal, Optional, Tuple, Type, Union
  from urllib import request
  import m2r
  from schemapi import codegen
  from schemapi.codegen import CodeSnippet
  from schemapi.utils import SchemaInfo, get_valid_identifier, resolve_references, ruff_format_str, rst_syntax_for_class, indent_docstring
label_desc: Use image node_id 10 for calling a global function with example usage: toposort(graph) and returns: stack