Extract initial arguments for the dash app

def get_initial_arguments(request, cache_id=None):
    'Extract initial arguments for the dash app'

    if cache_id is None:
        return None

    if initial_argument_location():
        return cache.get(cache_id)

    return request.session[cache_id]