Python counter interval speed ignored when 'smooth numbers' node included

Hi, I have a python counter. When I include the ‘smooth numbers’’ node inside the script, the interval constraint is ignored. Please advise, as I need that smoothing to filter noisy input data
counter_debug.gh (8.7 KB)

I’ve been trying to make my own 'Smoothing Number" node, so like a Mean Smoothing value (or average) based on a sampling level (number of samples to average)

But I don’t think my python code is correct as i seems not the full list is taken into consideration. I would appreciate it if someone more expert could have a look. thanks!!

counter_debug_2.gh (14.6 KB)