def parse_metadata_state_descriptions(state_string):
 result = {}
 state_string = state_string.strip()
 if state_string:
  cols = map(strip, state_string.split(';'))
  for c in cols:
   (colname, vals) = map(strip, c.split(':', 1))
   vals = map(strip, vals.split(','))
   result[colname] = set(vals)
 return result

def parse_metadata_state_descriptions ( state_string ) : result = { } state_string = state_string . strip ( ) if state_string : cols = map ( strip , state_string . split ( ';' ) ) for c in cols : ( colname , vals ) = map ( strip , c . split ( ':' , 1 ) ) vals = map ( strip , vals . split ( ',' ) ) result [ colname ] = set ( vals ) return result
from string in format col1:good1 .