def transitive_deps(lib_map, node):
    """Returns a list of transitive dependencies from node.

    Recursively iterate all dependent node in a depth-first fashion and
    list a result using a topological sorting.
    """
    result = []
    seen = set()
    start = node

    def recursive_helper(node):
        if node is None:
            return
        for dep in node.get("deps", []):
            if dep not in seen:
                seen.add(dep)
                next_node = lib_map.get(dep)
                recursive_helper(next_node)
        if node is not start:
            result.insert(0, node["name"])

    recursive_helper(node)
    return result