def METHOD_NAME(module=None):
    if module is not None:
        for module in _modules:
            if module in sys.modules:
                del sys.modules[module]
    for cb in _callbacks.values():
        cb.stop()
    _callbacks.clear()
    if state.location is not None:
        # In case session has been cleaned up
        state.location.reload = True
    for loc in state._locations.values():
        loc.reload = True