let new_node (graph : graph)
             (id    : nodeid)
             (lang  : lang) : node =
  let newnode = { id = id;
                  lang = lang;
                  inb  = Hashtbl.create 10;
                  outb = Hashtbl.create 10 } in
    Hashtbl.replace graph id newnode;
    newnode