def instantiate_by_name(self, object_name):
if object_name not in self.instances:<EOL><INDENT>instance = self.instantiate_from_data(self.environment[object_name])<EOL>self.instances[object_name] = instance<EOL>return instance<EOL><DEDENT>else:<EOL><INDENT>return self.instances[object_name]<EOL><DEDENT>
Instantiate object from the environment, possibly giving some extra arguments