def weighted_average_cost_of_capital(cost_of_common, cost_of_debt, cost_of_preferred, weights_dict):
    """
    Summary: Calculate a firm's wACC.
    
    PARA cost_of_common: The firm's cost of common equity.
    PARA type: float
    
    PARA cost_of_debt: The firm's cost of debt.
    PARA type: float
    
    PARA cost_of_preferred: The firm's cost of preferred equity.
    PARA type: float
    
    PARA weights_dict: The capital weights for each capital structure.
    PARA type: dictionary
    
    """    
    
    weight_debt = weights_dict['total_debt']
    weight_common = weights_dict['common_stock']
    weight_preferred = weights_dict['preferred_stock']
    
    return (weight_debt * cost_of_debt) + (weight_common * cost_of_common) + (weight_preferred * cost_of_preferred)