Implementation of Ketama consistent hash algorithm with Python