def get_number(s, cast=int):
    import string
    d = "".join(x for x in str(s) if x in string.digits)
    return cast(d)
Test that editing a report for an outdated data source creates a new data source.
dataset/ETHPy150Open tanghaibao/jcvi/formats/base.py/get_number--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/userreports/tests/test_report_builder.py/ReportBuilderTest.test_updating_out_of_date_report