 (>defn get-node
   ([graph node-id]
    [(s/keys :req [::nodes]) (? ::node-id)
-    => (? (s/keys))]
+    => (? ::node)]
    (get-in graph [::nodes node-id]))
 
   ([graph node-id k]


(>defn branch-node?
  [node]
  [(? (s/keys)) => boolean?]
  (boolean (node-branches node)))

(>defn node-kind
  "Return a keyword describing the type of the node."
  [node]
  [(? (s/keys)) => ::node-type]
  (cond
    (pc-sym node)
    ::node-resolver

  "Direct successors of node, branch nodes and run-next, in case of branch nodes the
  branches will always come before the run-next."
  [{::keys [run-next] :as node}]
  [::node => (s/coll-of ::node-id)]
  (let [branches (node-branches node)]
    (cond-> []
      branches
