def calc_insurance(scenario, years, months_in_a_year):
    """Calculate Insurance costs Function

    Args:
       scenario (object): The farm scenario
       years (int): The no. of years the simulation will analyse
       months_in_a_year (int): The no. of months in a year

    Returns:
        opex_insurance (list): Operational expenditure on insurance as a time series for each year
    """
    opex_insurance = [0]
    for y in range(years + 1):
        if y == 1:
            opex_insurance.append(scenario.insurance_pilot * months_in_a_year)
        elif y > 1:
            opex_insurance.append(scenario.insurance_full * months_in_a_year)

    return opex_insurance