https://numbas.mathcentre.ac.uk/question/145481/stats-extension-data-binning-function.zip?