def gprofit(total_revenue, cogs):
    """
    Computes the gross profit.

    Parameters
    ----------
    total_revenue : int or float
        Total revenue for the period
    cogs : int or float
        Cost of goods sold

    Returns
    -------
    out : int or float
        Gross profit
    """
    return total_revenue - cogs