code: def _parse_btrfs_info(data):
      '''
      Parse BTRFS device info data.
      '''
      ret = {}
      for line in [line for line in data.split("\n") if line][:-1]:
          if line.startswith("Label:"):
              line = re.sub(r"Label:\s+", "", line)
              label, uuid_ = [tkn.strip() for tkn in line.split("uuid:")]
              ret['label'] = label != 'none' and label or None
              ret['uuid'] = uuid_
              continue
  
          if line.startswith("\tdevid"):
              dev_data = re.split(r"\s+", line.strip())
              dev_id = dev_data[-1]
              ret[dev_id] = {
                  'device_id': dev_data[1],
                  'size': dev_data[3],
                  'used': dev_data[5],
                  }
  
      return ref _parse_btrfs_info(data):
      '''
      Parse BTRFS device info data.
      '''
      ret = {}
      for line in [line for line in data.split("\n") if line][:-1]:
          if line.startswith("Label:"):
              line = re.sub(r"Label:\s+", "", line)
              label, uuid_ = [tkn.strip() for tkn in line.split("uuid:")]
              ret['label'] = label != 'none' and label or None
              ret['uuid'] = uuid_
              continue
  
          if line.startswith("\tdevid"):
              dev_data = re.split(r"\s+", line.strip())
              dev_id = dev_data[-1]
              ret[dev_id] = {
                  'device_id': dev_data[1],
                  'size': dev_data[3],
                  'used': dev_data[5],
                  }
  
      return ret
docs: Parse BTRFS device info data.