def technical_404_response(request, exception):
    try:
        tried = exception.args[0]['tried']
    except (IndexError, TypeError, KeyError):
        tried = []
    else:
        if not tried:
            # tried exists but is an empty list. The URLconf must've been empty.
            return empty_urlconf(request)

    urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)
    if isinstance(urlconf, types.ModuleType):
        urlconf = urlconf.__name__

    t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template')
    c = Context({
        'urlconf': urlconf,
        'root_urlconf': settings.ROOT_URLCONF,
        'request_path': request.path_info[1:], # Trim leading slash
        'urlpatterns': tried,
        'reason': smart_str(exception, errors='replace'),
        'request': request,
        'settings': get_safe_settings(),
    })
    return HttpResponseNotFound(t.render(c), mimetype='text/html')
L{_shadowGetByName} uses the C{shadow} module to return a tuple of items
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/views/debug.py/technical_404_response--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_checkers.py/HelperTests.test_shadowGetByNameWithoutSpwd