#NEWLINE# def ensure_rating( self , rating ) : #NEWLINE# #INDENT# if isinstance ( rating , self . rating_class ) : #NEWLINE# #INDENT# return rating #NEWLINE# #UNINDENT# return self . rating_class ( rating )