def multiply(sets, **totals2):
    """
    Multiplies totals2 dictionary's values by the number of sets.
    Loops through the values in the totals2 dictionary and multiplies 
    each value by the number of sets for the group. Replaces the value 
    in the totals2 dictionary for the given item and returns the new set 
    of values. 

    Parameters:
    - sets (int): Number of sets for the current group of materials
    - **totals2 (dict): Unpacked dictionary of the modified totals for 
    each set of materials. Ex: {Paper: 20, Color: 40}

    Returns:
    - (int): sets - The number of sets for the current group
    - (dict): totals - The material: amount dictionary for the current group
    """
    # loop through the totals and multiply the values by the sets and return
    for item, total in totals2.items():
        totals2[item] = total * sets
    return sets, totals2