def get_shipping_costs(request, shipping_method):
    if shipping_method is None:
        return {
            "price_net": 0.0,
            "price_gross": 0.0,
            "tax": 0.0
        }
    price_gross = shipping_method.get_price_gross(request)
    price_net = shipping_method.get_price_net(request)
    tax = shipping_method.get_tax(request)

    return {
        "price_net": price_net,
        "price_gross": price_gross,
        "tax": tax
    }
Accepts decoration function arguments.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/shipping/utils.py/get_shipping_costs--crossover with--dataset/ETHPy150Open idlesign/django-sitegate/sitegate/utils.py/DecoratorBuilder.__init__