def total_cost(J_content, J_style, alpha=10, beta=40):
    """
    Computes the total cost function. Because the main purpose of the algorithm
    is on matching the style of a target photo a bigger weight (beta) is given to
    the style image.
    Parameters
    ----------
    J_content: float
        content cost computed in compute_content_cost
    J_style: float
        style cost computed in compute_style_cost
    alpha: float
        hyperparameter weighting the importance of the content cost
    beta: float
        hyperparameter weighting the importance of the style cost
    Returns
    -------
    J
        total cost
    """
    J = alpha * J_content + beta * J_style

    return J