def educate_quotes(s):
 s = single_quote_start_re.sub('&#8217;', s)
 s = double_quote_start_re.sub('&#8221;', s)
 s = double_quote_sets_re.sub('&#8220;&#8216;', s)
 s = single_quote_sets_re.sub('&#8216;&#8220;', s)
 s = decade_abbr_re.sub('&#8217;', s)
 s = opening_single_quotes_regex.sub('\\1&#8216;', s)
 s = closing_single_quotes_regex.sub('\\1&#8217;', s)
 s = closing_single_quotes_regex_2.sub('\\1&#8217;\\2', s)
 s = s.replace("'", '&#8216;')
 s = opening_double_quotes_regex.sub('\\1&#8220;', s)
 s = closing_double_quotes_regex.sub('&#8221;', s)
 s = closing_double_quotes_regex_2.sub('\\1&#8221;', s)
 return s.replace('"', '&#8220;')

def educate_quotes ( s ) : s = single_quote_start_re . sub ( '&#8217;' , s ) s = double_quote_start_re . sub ( '&#8221;' , s ) s = double_quote_sets_re . sub ( '&#8220;&#8216;' , s ) s = single_quote_sets_re . sub ( '&#8216;&#8220;' , s ) s = decade_abbr_re . sub ( '&#8217;' , s ) s = opening_single_quotes_regex . sub ( '\\1&#8216;' , s ) s = closing_single_quotes_regex . sub ( '\\1&#8217;' , s ) s = closing_single_quotes_regex_2 . sub ( '\\1&#8217;\\2' , s ) s = s . replace ( "'" , '&#8216;' ) s = opening_double_quotes_regex . sub ( '\\1&#8220;' , s ) s = closing_double_quotes_regex . sub ( '&#8221;' , s ) s = closing_double_quotes_regex_2 . sub ( '\\1&#8221;' , s ) return s . replace ( '"' , '&#8220;' )
parameter: string .