def set_bits(self, val):
    val &= ((1 << self.size) - 1)
    self.owner._value &= (~ self.mask)
    self.owner._value |= (val << self.offset)
def set_bits(self, val):
    val &= ((1 << self.size) - 1)
    self.owner._value &= (~ self.mask)
    self.owner._value |= (val << self.offset)