def _get_widget(request, module, widget_name):

    import_name = module.name + ".widgets"
    module_widget_lib = __import__(import_name, fromlist=[str(module.name)])
    module_widgets = module_widget_lib.get_widgets(request)

    widget = {}
    # Preprocess widget, ensure it has all required fields
    for name in module_widgets:
        if name == widget_name:
            widget = module_widgets[name]
            if 'module_name' not in widget:
                widget['module_name'] = module.name
            if 'module_title' not in widget:
                widget['module_title'] = module.title
            widget = _preprocess_widget(widget, widget_name)
            break

    return widget
Attempts to set the current token and add it to the token store.
dataset/ETHPy150Open treeio/treeio/treeio/core/dashboard/views.py/_get_widget--crossover with--dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/service.py/GDataService.SetOAuthToken