#NEWLINE# def serialize( self ) : #NEWLINE# #INDENT# if isinstance ( self . requirements , SchemaItem ) : #NEWLINE# #INDENT# requirements = self . requirements . serialize ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# requirements = [ ] #NEWLINE# for requirement in self . requirements : #NEWLINE# #INDENT# if isinstance ( requirement , SchemaItem ) : #NEWLINE# #INDENT# requirements . append ( requirement . serialize ( ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# requirements . append ( requirement ) #NEWLINE# #UNINDENT# #UNINDENT# return { #NEWLINE# #INDENT# 'required' : requirements , #NEWLINE# #UNINDENT# }