#NEWLINE# @ classmethod #NEWLINE# def instantiate_items( cls , items ) : #NEWLINE# #INDENT# 'returns a map from classes to instances' #NEWLINE# instancemap = dict ( ( ( item , item ( ) ) for item in items ) ) #NEWLINE# iteminstances = map ( instancemap . get , items ) #NEWLINE# for inst in iteminstances : #NEWLINE# #INDENT# inst . depends = tuple ( map ( instancemap . get , inst . depends ) ) #NEWLINE# if isinstance ( items , Group ) : #NEWLINE# #INDENT# inst . contains = tuple ( map ( instancemap . get , inst . contains ) ) #NEWLINE# #UNINDENT# #UNINDENT# return instancemap