def create_customer(request):
    if request.session.session_key is None:
        request.session.save()

    customer = Customer.objects.create(session=request.session.session_key)
    if request.user.is_authenticated():
        customer.user = request.user
    shop = lfs.core.utils.get_default_shop(request)

    address_model = lfs.core.utils.import_symbol(ADDRESS_MODEL)
    customer.default_invoice_address = address_model.objects.create(customer=customer, country=shop.default_country)
    customer.default_shipping_address = address_model.objects.create(customer=customer, country=shop.default_country)
    customer.selected_invoice_address = address_model.objects.create(customer=customer, country=shop.default_country)
    customer.selected_shipping_address = address_model.objects.create(customer=customer, country=shop.default_country)
    customer.save()

    customer.default_invoice_address.customer = customer
    customer.default_invoice_address.save()
    customer.default_shipping_address.customer = customer
    customer.default_shipping_address.save()

    customer.selected_invoice_address.customer = customer
    customer.selected_invoice_address.save()
    customer.selected_shipping_address.customer = customer
    customer.selected_shipping_address.save()

    return customer
Push a `value` into rank `key` in the stack.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/customer/utils.py/create_customer--crossover with--dataset/ETHPy150Open Stiivi/brewery/brewery/nodes/base.py/Stack.push