def factory(cls, name, *args, **kwargs):
    """Return an instance of the registered Thing identified by ``name``."""
    klass = cls.get(name)
    if not klass:
        raise KeyError('{} having name {} not found'.format(cls, name))
    return klass(*args, **kwargs)
