def _find_start(score_matrix, align_globally):
 (nrows, ncols) = (len(score_matrix), len(score_matrix[0]))
 if align_globally:
  starts = [(score_matrix[(-1)][(-1)], ((nrows - 1), (ncols - 1)))]
 else:
  starts = []
  for row in range(nrows):
   for col in range(ncols):
    score = score_matrix[row][col]
    starts.append((score, (row, col)))
 return starts

def _find_start ( score_matrix , align_globally ) : ( nrows , ncols ) = ( len ( score_matrix ) , len ( score_matrix [ 0 ] ) ) if align_globally : starts = [ ( score_matrix [ ( - 1 ) ] [ ( - 1 ) ] , ( ( nrows - 1 ) , ( ncols - 1 ) ) ) ] else : starts = [ ] for row in range ( nrows ) : for col in range ( ncols ) : score = score_matrix [ row ] [ col ] starts . append ( ( score , ( row , col ) ) ) return starts
return a list of starting points (score .