def METHOD_NAME(
    *,
    product_channel_listing: Optional[ProductChannelListing],
    variants_channel_listing: List[ProductVariantChannelListing],
    prices_entered_with_tax: bool,
    tax_calculation_strategy: str,
    tax_rate: Decimal
) -> ProductAvailability:
    discounted: Optional[TaxedMoneyRange] = None
    discounted_net_range = get_product_price_range(
        variants_channel_listing=variants_channel_listing, discounted=True
    )
    if discounted_net_range is not None:
        discounted = TaxedMoneyRange(
            start=_calculate_product_price_with_taxes(
                discounted_net_range.start,
                tax_rate,
                tax_calculation_strategy,
                prices_entered_with_tax,
            ),
            stop=_calculate_product_price_with_taxes(
                discounted_net_range.stop,
                tax_rate,
                tax_calculation_strategy,
                prices_entered_with_tax,
            ),
        )
    undiscounted: Optional[TaxedMoneyRange] = None
    undiscounted_net_range = get_product_price_range(
        variants_channel_listing=variants_channel_listing,
        discounted=False,
    )
    if undiscounted_net_range is not None:
        undiscounted = TaxedMoneyRange(
            start=_calculate_product_price_with_taxes(
                undiscounted_net_range.start,
                tax_rate,
                tax_calculation_strategy,
                prices_entered_with_tax,
            ),
            stop=_calculate_product_price_with_taxes(
                undiscounted_net_range.stop,
                tax_rate,
                tax_calculation_strategy,
                prices_entered_with_tax,
            ),
        )
    discount = None
    if undiscounted is not None and discounted is not None:
        discount = _get_total_discount_from_range(undiscounted, discounted)
    is_visible = (
        product_channel_listing is not None and product_channel_listing.is_visible
    )
    is_on_sale = is_visible and discount is not None
    return ProductAvailability(
        on_sale=is_on_sale,
        price_range=discounted,
        price_range_undiscounted=undiscounted,
        discount=discount,
    )