#NEWLINE# def get_next_sibling( self ) : #NEWLINE# #INDENT# "\n        :returns:\n\n            The next node's sibling, or None if it was the rightmost\n            sibling.\n        " #NEWLINE# siblings = self . get_siblings ( ) #NEWLINE# ids = [ obj . pk for obj in siblings ] #NEWLINE# if ( self . pk in ids ) : #NEWLINE# #INDENT# idx = ids . index ( self . pk ) #NEWLINE# if ( idx < ( len ( siblings ) - 1 ) ) : #NEWLINE# #INDENT# return siblings [ ( idx + 1 ) ]