This function looks similar to ```GlobalStats.get```, is it worth factoring out the code into a reusable function?