Cross Validation From Scratch Python