def get(self, property):
        """Lookups the given property name in context.
        Raises KeyError when no such property is found.
        """
        if property not in self.factories:
            raise KeyError("No factory for: %s", property)

        if property in self.instances:
            return self.instances[property]

        factory_spec = self.factories[property]
        instance = self._instantiate(property, *factory_spec)
        self.instances[property] = instance
        return instance
Lookups the given property name in context.
        Raises KeyError when no such property is found.
        
recipes/Python/576609_Noninvasive_Dependency_Injection/recipe-576609.py