Kernel Density Estimation Python Code For Snake