Moderate Deviations and Large Deviations for Kernel Density Estimators