code: def encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          remainder = len(value) % 8
          if remainder:
              value += Bits(bin='0' * (8 - remainder))
          return valuf encode(self, value):
          '''
          :param value: value to encode
          '''
          kassert.is_of_types(value, Bits)
          remainder = len(value) % 8
          if remainder:
              value += Bits(bin='0' * (8 - remainder))
          return value
docs: :param value: value to encode