def string_to_numeric(string, type=int):
    try:
        return type(string)
    except __HOLE__:
        return 0
dataset/ETHPy150Open dimagi/commcare-hq/custom/m4change/user_calcs/__init__.py/string_to_numeric