"""Intentionally buggy course tasks. Do not use in production."""
def shipping_cents(grams):
    return (grams // 1000) * 800


def active_orders(orders):
    for order in orders:
        if order.get('status') not in {'pending', 'transit'}:
            orders.remove(order)
    return orders


def cache_key(tenant, user, order_id, version):
    return order_id
