def calculate_transaction_revenue(trade_volume, last_price, brokerage_fee):
    """Calculates transaction revenue

    Parameters:
        trade_volume (float): the amount of stocks that the user wants to sell
        last_price (float): the last price of the stock
        brokerage_fee (float): price of the transaction

    Returns:
        transaction_revenue (float): the amount that that user earns from the transaction
    """
    transaction_revenue = (trade_volume * last_price) - brokerage_fee

    return transaction_revenue