def load_checkout(view):
    @wraps(view)
    def func(request):
        try:
            session_data = request.session[STORAGE_SESSION_KEY]
        except __HOLE__:
            session_data = ''
        tracking_code = analytics.get_client_id(request)
        cart = Cart.for_session_cart(
            request.cart, discounts=request.discounts)
        checkout = Checkout.from_storage(
            session_data, cart, request.user, tracking_code)
        response = view(request, checkout)
        if checkout.modified:
            request.session[STORAGE_SESSION_KEY] = checkout.for_storage()
        return response

    return func
dataset/ETHPy150Open mirumee/saleor/saleor/checkout/core.py/load_checkout