#NEWLINE# def max_definition_level( self , path ) : #NEWLINE# #INDENT# 'get the max definition level for the given schema path.' #NEWLINE# max_level = 0 #NEWLINE# for part in path : #NEWLINE# #INDENT# se = self . schema_element ( part ) #NEWLINE# if ( se . repetition_type != FieldRepetitionType . REQUIRED ) : #NEWLINE# #INDENT# max_level += 1 #NEWLINE# #UNINDENT# #UNINDENT# return max_level