docs: def encodeSemiOctets(number):
      """ Semi-octet encoding algorithm (e.g. for phone numbers)
          
      :return: bytearray containing the encoded octets
      :rtype: bytearray
      """
      if len(number) % 2 == 1:
          number = number + 'F' # append the "end" indicator
      octets = [int(number[i+1] + number[i], 16) for i in xrange(0, len(number), 2)]
      return bytearray(octets)