#NEWLINE# def getTrainingMatches( self ) : #NEWLINE# #INDENT# '\n        Returns a list of all pairs of images in the training set that \n        are of the same person.\n        ' #NEWLINE# matches = [ ] #NEWLINE# for i in range ( len ( self . training_data ) ) : #NEWLINE# #INDENT# for j in range ( ( i + 1 ) , len ( self . training_data ) ) : #NEWLINE# #INDENT# if ( i == j ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( self . training_data [ i ] [ 3 ] == self . training_data [ j ] [ 3 ] ) : #NEWLINE# #INDENT# matches . append ( [ self . training_data [ i ] , self . training_data [ j ] ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return matches