Given a graph with nodes, each having a set of inputs (on left) and outputs (on right), find a suitable layout of the graph's nodes in a plane.