'Sort something into one of self.NUM_BUCKETS buckets.
:param seed -- a string used for shifting the deterministic bucketing
algorithm.  In most cases, this will be an Account\'s
_fullname.
:return int -- a bucket, 0 <= bucket < self.NUM_BUCKETS'

def _calculate_bucket(self, seed, experiment_seed=None):

    hashed = hashlib.sha1((self.name + seed))
    bucket = (long(hashed.hexdigest(), 16) % self.NUM_BUCKETS)
    return bucket
