Thanks for the detailed answer. This is exactly the sort of function I was after and I think that this post will be helpful when it comes to creating custom Interconnect shapes.
With 0.5.4 this line
for lay, grow, acc, line in nd.layeriter(xs, layer):
returned a ValueError: not enough values to unpack (expected 4, got 3), so I commented the
line parameter out since it wasn’t being used anywhere in the loop.