This function is exactly same as that in `riak_cs_wm_users` and `riak_cs_wm_stats` . Should repetitions moved to `riak_cs_wm_utils` or whatever.