Change seed sanitiser function in Python to match C++ for MWC.