def twitter_begin(fun):
    @wraps(fun)
    def inner(request, *args, **kwargs):
        fun(request, *args, **kwargs)
        client = twitter.Twitter()
        url, token, secret = client.generate_authorization()
        request.session['temporary_oauth_token'] = token
        request.session['temporary_oauth_secret'] = secret
        return HttpResponseRedirect(url)
    return inner
Check correct index use and value relative to a given path.
dataset/ETHPy150Open elmcitylabs/ECL-Twitter/ecl_twitter/decorators.py/twitter_begin--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/protourlencode.py/URLEncodedRequestBuilder.__check_index