python code to generate new partition data