@classmethod
def from_list(cls, buckets, bucket_offsets=None):
    """This method will be lossy if the bucket_offsets are different"""
    if not bucket_offsets:
        bucket_offsets = cls.BUCKET_OFFSETS
    h = cls()
    if bucket_offsets == cls.BUCKET_OFFSETS:
        for i, v in enumerate(buckets):
            h.buckets[i] = v
        h.total = sum(buckets)
    else:
        for i, v in enumerate(buckets):
            h.add(bucket_offsets[i] - 1, v)
    return h
