switch python lattice to new two-distributionAPI