def get_page_size(request, default=20):
    session = request.session
    cookies = request.COOKIES
    try:
        page_size = int(session.get('horizon_pagesize',
                                    cookies.get('horizon_pagesize',
                                                getattr(settings,
                                                        'API_RESULT_PAGE_SIZE',
                                                        default))))
    except __HOLE__:
        page_size = session['horizon_pagesize'] = int(default)
    return page_size
dataset/ETHPy150Open CiscoSystems/avos/horizon/utils/functions.py/get_page_size