<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def print_device_aldb(self, addr):
 """Diplay the All-Link database for a device."""

        if Address(addr).id == self.plm.address.id:
            device = self.plm
        else:
            dev_addr = Address(addr)
            device = self.plm.devices[dev_addr.id]
        if device:
            if device.aldb.status in [ALDBStatus.LOADED, ALDBStatus.PARTIAL]:
                if device.aldb.status == ALDBStatus.PARTIAL:
                    _LOGGING.info('ALDB partially loaded for device %s', addr)
                for mem_addr in device.aldb:
                    record = device.aldb[mem_addr]
                    _LOGGING.debug('mem_addr: %s', mem_addr)
                    _LOGGING.info('ALDB record: %s', record)
            else:
                _LOGGING.info('ALDB not loaded. '
                              'Use `load_aldb %s` first.',
                              device.address.id)
        else:
            _LOGGING.info('Device not found.')