code: def encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          result = BitArray(value)
          result.reverse()
          return resulf encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          result = BitArray(value)
          result.reverse()
          return result
docs: :param value: value to encode