def METHOD_NAME(request: HttpRequest):
    # 年度总结
    from dm.summary import generic_info, person_info
    base_dir = 'test_data'
    logged_in = request.user.is_authenticated
    if logged_in:
        username = request.session.get("NP", "")
        if username:
            from app.utils import update_related_account_in_session
            update_related_account_in_session(request, username, shift=True)
    is_freshman = request.user.username.startswith('22')
    user_accept = request.GET.get('accept') == 'true'
    infos = generic_info()
    infos.update(
        logged_in=logged_in,
        is_freshman=is_freshman,
        user_accept=user_accept,
    )
    if user_accept and logged_in and not is_freshman:
        try:
            infos.update(person_info(request.user))
            with open(os.path.join(base_dir, 'rank_info.json')) as f:
                rank_info = json.load(f)
                sid = request.user.username
                for k in ['co_pct', 'func_appoint_pct', 'discuss_appoint_pct']:
                    infos[k] = rank_info[k].index(
                        sid) * 100 // len(rank_info[k])
        except:
            pass
    else:
        try:
            example_file = os.path.join(base_dir, 'example.json')
            with open(example_file) as f:
                infos.update(json.load(f))
        except:
            pass
    return render(request, 'Appointment/summary2021.html', infos)