def get_hub():
    try:
        hub = _threadlocal.hub
    except AttributeError:
        # instantiate a Hub
        try:
            _threadlocal.Hub
        except AttributeError:
            use_hub()

        hub = _threadlocal.hub = _threadlocal.Hub()
    return hub
Get the current event hub singleton object
dataset/ETHPy150Open veegee/guv/guv/hubs/hub.py/get_hub