def METHOD_NAME(self, line_items, coupons):
    """Return available discounts given line items and coupon codes."""
    if not line_items:
        return []
    item = Item.query.get(line_items[0].item_id)
    if not item.is_available and not item.is_cancellable():
        # item unavailable, no discounts
        return []
    return DiscountPolicy.get_from_item(item, len(line_items), coupons)