A setattr wrapper call used only by _publish(). This ensures that anything
    published into this module is also published into tc.extensions

def _setattr_wrapper(mod, key, value):
    """
    A setattr wrapper call used only by _publish(). This ensures that anything
    published into this module is also published into tc.extensions
    """
    setattr(mod, key, value)
    if mod == _thismodule:
        setattr(_sys.modules[__name__], key, value)