def _usage_specific(raw):
 get_key = (lambda val: dict([tuple(val.split(':'))]))
 raw = raw.split('\n')
 (section, size, used) = raw[0].split(' ')
 section = section.replace(',', '_').replace(':', '').lower()
 data = {}
 data[section] = {}
 for val in [size, used]:
  data[section].update(get_key(val.replace(',', '')))
 for devices in raw[1:]:
  data[section].update(get_key(re.sub('\\s+', ':', devices.strip())))
 return data

def _usage_specific ( raw ) : get_key = ( lambda val : dict ( [ tuple ( val . split ( ':' ) ) ] ) ) raw = raw . split ( '\n' ) ( section , size , used ) = raw [ 0 ] . split ( ' ' ) section = section . replace ( ',' , '_' ) . replace ( ':' , '' ) . lower ( ) data = { } data [ section ] = { } for val in [ size , used ] : data [ section ] . update ( get_key ( val . replace ( ',' , '' ) ) ) for devices in raw [ 1 : ] : data [ section ] . update ( get_key ( re . sub ( '\\s+' , ':' , devices . strip ( ) ) ) ) return data
parse usage/specific .