#NEWLINE# def getEnvironment( name ) : #NEWLINE# #INDENT# "Get an environment with the given ```name``` attribute in\n       it's romeo configuration file.\n\n       @param name (string)\n       @return romeo.foundation.KeyValue instance\n    " #NEWLINE# for node in foundation . RomeoKeyValue . search ( 'NAME' , value = name ) : #NEWLINE# #INDENT# for obj in node . ANCESTORS : #NEWLINE# #INDENT# if ( not obj . ROOTNODE ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not obj . isRelated ( node ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# return obj #NEWLINE# #UNINDENT# #UNINDENT# raise EnvironmentalError ( ( 'no environment %s' % ( name , ) ) )