def calc_packaging(scenario, years, w1, w2, w3, w4):
    """Calculate Packaging costs Function

    Args:
       scenario (object): The farm scenario
       w1 (list): Time series of annual yields with waste_adjustment for crop 1
       w2 (list): Time series of annual yields with waste_adjustment for crop 2
       w3 (list): Time series of annual yields with waste_adjustment for crop 3
       w4 (list): Time series of annual yields with waste_adjustment for crop 4
       years (int): The no. of years the simulation will analyse


    Returns:
        cogs_packaging (list): Cost of Goods Sold expenditure on Packaging as a time series for each year

    To Do:
        Update packaging function to be more flexible and accurate
        Update for all crops, not just crop 1, 2, 3, 4
        Get costs from a table (perhaps taken from Excel spreadsheets) to take into economic order quantity
        Include order quantity as an output
    """

    cogs_packaging =[]

    for y in range(years+1):
        annual_packaging_cost = 0
        annual_packaging_cost += (w1[y] / scenario.crop1_product_weight)
        # annual_packaging_cost += (w2[y]/scenario.crop2_product_weight)
        # annual_packaging_cost += (w3[y]/scenario.crop3_product_weight)
        # annual_packaging_cost += (w4[y]/scenario.crop4_product_weight)
        if y <= 1:
            annual_packaging_cost *= scenario.packaging_cost_pilot
        elif y > 1:
            annual_packaging_cost *= scenario.packaging_cost_full
        cogs_packaging.append(annual_packaging_cost)

    return cogs_packaging