#NEWLINE# def get_instance_by_name( self , instance_name ) : #NEWLINE# #INDENT# for instance in self . list_instances ( ) : #NEWLINE# #INDENT# if ( instance . name == instance_name ) : #NEWLINE# #INDENT# return instance #NEWLINE# #UNINDENT# #UNINDENT# raise LookupError ( 'Instance with name: {} not found' . format ( instance_name ) )