Cross Validation Code In Python For Snake