def pretty(self, indent=0):
        lines = list()
        if self.name:
            lines.append(("identifier", repr(self.name)))
        lines.append(("device address", self.device_address))
        if self.local_device_name:
            lines.append(("device name", self.local_device_name))
        if self.class_of_device:
            cod = self.class_of_device
            if cod & 0x003 == 0:
                lines.append(("device class", decode_class_of_device(cod)))
                msc = [major_service_class[mask]
                       for mask in sorted(major_service_class)
                       if self.class_of_device >> 13 & mask]
                lines.append(("major service", ", ".join(msc)))
            else:
                lines.append(("class of device", "{0:b}".format(cod)))
        if self.simple_pairing_hash:
            simple_pairing_hash = str(self.simple_pairing_hash)
            lines.append(("pubkey hash", simple_pairing_hash.encode("hex")))
        if self.simple_pairing_rand:
            simple_pairing_rand = str(self.simple_pairing_rand)
            lines.append(("randomizer", simple_pairing_rand.encode("hex")))
        for service_class_uuid in self.service_class_uuid_list:
            try: service_class = service_class_uuid_map[service_class_uuid]
            except __HOLE__: service_class = service_class_uuid
            lines.append(("service class", service_class))
        for key, value in self.eir.items():
            if key not in (3, 5, 7, 8, 9, 13, 14, 15):
                lines.append(("EIR 0x%02x" % key, repr(value)))
        
        indent = indent * ' '
        lwidth = max([len(line[0]) for line in lines])
        lines = [line[0].ljust(lwidth) + " = " + line[1] for line in lines]
        return ("\n").join([indent + line for line in lines])
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/ndef/bt_record.py/BluetoothConfigRecord.pretty