'Return the distro ID of the Linux distribution, as a string.
For details, see :func:`distro.id`.'

def id(self):

    def normalize(distro_id, table):
        distro_id = distro_id.lower().replace('    ', '_')
        return table.get(distro_id, distro_id)
    distro_id = self.os_release_attr('id')
    if distro_id:
        return normalize(distro_id, NORMALIZED_OS_ID)
    distro_id = self.lsb_release_attr('distributor_id')
    if distro_id:
        return normalize(distro_id, NORMALIZED_LSB_ID)
    distro_id = self.distro_release_attr('id')
    if distro_id:
        return normalize(distro_id, NORMALIZED_DISTRO_ID)
    return ''
