def parse_freshdesk_event(event_string):
 data = event_string.replace('{', '').replace('}', '').replace(',', ':').split(':')
 if (len(data) == 2):
  return data
 else:
  (property, _, from_state, _, to_state) = data
  return [property, property_name(property, int(from_state)), property_name(property, int(to_state))]

def parse_freshdesk_event ( event_string ) : data = event_string . replace ( '{' , '' ) . replace ( '}' , '' ) . replace ( ',' , ':' ) . split ( ':' ) if ( len ( data ) == 2 ) : return data else : ( property , _ , from_state , _ , to_state ) = data return [ property , property_name ( property , int ( from_state ) ) , property_name ( property , int ( to_state ) ) ]
these are always of the form "{ticket_action:created}" or "{status:{from:4 .