def month_filter_number_from_arg(month, error):
    try:
        month_number = Months.options[month]
    except __HOLE__:
        error(
            "Months should be e.g. PrevDec/PreviousDecember/Jan/January or numbers "
            "in range 0 (PreviousDecember) to 12 (Dec), not %s" % month
        )
        return 1
    else:
        return month_number
dataset/ETHPy150Open sahana/eden/modules/ClimateDataPortal/DSL/Check.py/month_filter_number_from_arg