Update python extract-betas code.