#NEWLINE# def _get_core_cluster( self , core ) : #NEWLINE# #INDENT# 'Returns the first cluster that has cores of the specified type. Raises\n        value error if no cluster for the specified type has been found' #NEWLINE# core_indexes = [ i for ( i , c ) in enumerate ( self . core_names ) if ( c == core ) ] #NEWLINE# core_clusters = set ( ( self . core_clusters [ c ] for i in core_indexes ) ) #NEWLINE# if ( not core_clusters ) : #NEWLINE# #INDENT# raise ValueError ( 'No cluster found for core {}' . format ( core ) ) #NEWLINE# #UNINDENT# return sorted ( list ( core_clusters ) ) [ 0 ]