#NEWLINE# def get_next_sibling( self ) : #NEWLINE# #INDENT# if hasattr ( self , '_parent' ) : #NEWLINE# #INDENT# if self . _parent : #NEWLINE# #INDENT# siblings = list ( self . _parent . get_children ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# siblings = [ siblings ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# return siblings [ ( siblings . index ( self ) + 1 ) ] #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# return super ( Node , self ) . get_next_sibling ( )