def shrink_case(case):
    toks = case.split("-")
    def shrink_if_number(x):
        try:
            cvt = int(x)
            return str(cvt)
        except __HOLE__:
            return x
    return "-".join([shrink_if_number(t) for t in toks])
dataset/ETHPy150Open woshialex/diagnose-heart/CNN_A/preprocess.py/shrink_case