code: def get_disk_labels(self):
          
          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
docs: Creates a mapping of device nodes to filesystem labels