add _toposort to datashape.internal_utils