#NEWLINE# def _norm( f , norm_func ) : #NEWLINE# #INDENT# if ( not f ) : #NEWLINE# #INDENT# return f . ring . domain . zero #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ground_abs = f . ring . domain . abs #NEWLINE# return norm_func ( [ ground_abs ( coeff ) for coeff in f . itercoeffs ( ) ] )