Gets or creates an instance of type <_type>

def _get_or_create_a(self, _type):
        """ Gets or creates an instance of type <_type> """
        self.l.debug("get_or_create_a: %s" % _type)
        stack = [Manager.GoCa_Plan(self, {_type: ()})]
        while stack:
            p = stack.pop()
            if p.finished:
                p.execute()
                return p.get_a(_type)
            for c in p.branches():
                stack.append(c)
        raise NotImplementedError