def get_relative_edd_from_preg_month(report_date, month):
    months_until_edd = 9 - month
    new_year, new_month = add_months(report_date.year, report_date.month, months_until_edd)
    return type(report_date)(new_year, new_month, 1)
dataset/ETHPy150Open dimagi/commcare-hq/custom/opm/tests/case_reports.py/get_relative_edd_from_preg_month/original