Allow using own get_statistics function