Specify the node shape depending on node type.