def _safe_int(r, default=0):
    if r is None:
        return default
    try:
        return int(r)
    except __HOLE__:
        return default
dataset/ETHPy150Open michaelliao/transwarp/transwarp/cache.py/_safe_int