def configure_uploads(app, upload_sets):
    if isinstance(upload_sets, UploadSet):
        upload_sets = (upload_sets,)

    if not hasattr(app, 'upload_set_config'):
        app.upload_set_config = {}
    set_config = app.upload_set_config
    defaults = dict(dest=app.config.get('UPLOADS_DEFAULT_DEST'),
                    url=app.config.get('UPLOADS_DEFAULT_URL'))

    for uset in upload_sets:
        config = config_for_set(uset, app, defaults)
        set_config[uset.name] = config

    try:
        set_config_values = set_config.itervalues()
    except AttributeError: # Python 3 has no itervalues()
        set_config_values = set_config.values()

    should_serve = any(s.base_url is None for s in set_config_values)
    if '_uploads' not in app.blueprints and should_serve:
        app.register_blueprint(uploads_bp)
Reset the lexer to process a new data feed.
dataset/ETHPy150Open jeffwidman/flask-uploads/flask_uploads.py/configure_uploads--crossover with--dataset/ETHPy150Open google/grr/grr/lib/lexer.py/Lexer.Reset