'Returns a tuple (platform_name, list_of_all_label_names).'

def platform_and_labels(self):

    rows = _db.execute('\n                                                                SELECT    afe_labels.name,    afe_labels.platform\n                                                                FROM    afe_labels\n                                                                INNER    JOIN    afe_hosts_labels    ON\n                                                                                                afe_labels.id    =    afe_hosts_labels.label_id\n                                                                WHERE    afe_hosts_labels.host_id    =    %s\n                                                                ORDER    BY    afe_labels.name\n                                                                ', (self.id,))
    platform = None
    all_labels = []
    for (label_name, is_platform) in rows:
        if is_platform:
            platform = label_name
        all_labels.append(label_name)
    return (platform, all_labels)
