#NEWLINE# def neighbors( self , randomize = False ) : #NEWLINE# #INDENT# 'Generate each index-neighbor pair for this shape.\n\n        randomize: True: random order; False: sorted\n        generates: n_index, None for nonexistent neighbors.\n        ' #NEWLINE# for n_index in self . n_indexes ( randomize = randomize ) : #NEWLINE# #INDENT# ( yield ( n_index , self . _grid . get ( n_index ) ) )