#NEWLINE# def __getitem__( self , key ) : #NEWLINE# #INDENT# resource_logical_id = key #NEWLINE# if ( resource_logical_id in self . _parsed_resources ) : #NEWLINE# #INDENT# return self . _parsed_resources [ resource_logical_id ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# resource_json = self . _resource_json_map . get ( resource_logical_id ) #NEWLINE# if ( not resource_json ) : #NEWLINE# #INDENT# raise KeyError ( resource_logical_id ) #NEWLINE# #UNINDENT# new_resource = parse_and_create_resource ( resource_logical_id , new_resource , self , self . _region_name ) #NEWLINE# self . _parsed_resources [ resource_logical_id ] = new_resource #NEWLINE# return new_resource