Update extract-betas python code.