#NEWLINE# def parse_definition( self , line ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( left_side , right_side ) = line . split ( '=' , 1 ) #NEWLINE# ( output_pattern , frequency ) = left_side . split ( ) #NEWLINE# ( method , input_pattern ) = right_side . split ( ) #NEWLINE# frequency = int ( frequency . lstrip ( '(' ) . rstrip ( ')' ) ) #NEWLINE# return AggregationRule ( input_pattern , output_pattern , method , frequency ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# log . err ( ( 'Failed to parse line: %s' % line ) ) #NEWLINE# raise