#NEWLINE# @ classmethod #NEWLINE# def add_extension_options( cls , * f ) : #NEWLINE# #INDENT# if isinstance ( f [ ( - 1 ) ] , dict ) : #NEWLINE# #INDENT# cls . fieldsets . insert ( cls . fieldset_insertion_index , f ) #NEWLINE# f [ 1 ] [ 'classes' ] = list ( f [ 1 ] . get ( 'classes' , [ ] ) ) #NEWLINE# f [ 1 ] [ 'classes' ] . append ( 'collapse' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cls . fieldsets [ 1 ] [ 1 ] [ 'fields' ] . extend ( f )