def _convert_punctuation( line ):
    ''' Converts given analysis line if it describes punctuation; Uses the set 
        of predefined punctuation conversion rules from _punctConversions;
        
        _punctConversions should be a list of lists, where each outer list stands 
        for a single conversion rule and inner list contains a pair of elements:
        first is the regexp pattern and the second is the replacement, used in
           re.sub( pattern, replacement, line )
        
        Returns the converted line (same as input, if no conversion was 
        performed);
    ''' 
    for [pattern, replacement] in _punctConversions:
        lastline = line
        line = re.sub(pattern, replacement, line)
        if lastline != line:
            break
    return line
def _convert_punctuation ( line ) : for [ pattern , replacement ] in _punctConversions : lastline = line line = re . sub ( pattern , replacement , line ) if lastline != line : break return line
Converts given analysis line if it describes punctuation; Uses the set 
        of predefined punctuation conversion rules from _punctConversions;
        
        _punctConversions should be a list of lists, where each outer list stands 
        for a single conversion rule and inner list contains a pair of elements:
        first is the regexp pattern and the second is the replacement, used in
           re.sub( pattern, replacement, line )
        
        Returns the converted line (same as input, if no conversion was 
        performed);