

def _remove_session(sender, *args, **kwargs):
    'Globally namespaced function for signals to work.'
    if hasattr(sender, 'app'):
        app = sender.app
        task = sender
    else:
        app = sender
        task = None
    try:
        kit = Kit()
    except KitError:
        pass
    else:
        kit.on_teardown(app, task)

dataset/ETHPy150Open mtth/kit/kit/base.py _remove_session/original