code: def set_bit(self, offset, value):
          
          return self.database.setbit(self.key, offset, value)
docs: Set the bit value at the given offset (in bits).
  
          :param int offset: bit offset
          :param int value: new value for bit, 1 or 0
          :returns: previous value at bit offset, 1 or 0