def get_disk_labels(self):
        """
        Creates a mapping of device nodes to filesystem labels
        """
        path = '/dev/disk/by-label/'
        labels = {}
        if not os.path.isdir(path):
            return labels

        for label in os.listdir(path):
            label = label.replace('\\x2f', '/')
            device = os.path.realpath(path + '/' + label)
            labels[device] = label

        return labels

        Creates a mapping of device nodes to filesystem labels
        
src/collectors/diskspace/diskspace.py