def get_retry_count(pid_dir, rule):
    path = os.path.join(pid_dir, "%s.retry_count" % rule.name)
    if os.path.exists(path):
        with open(path) as r:
            return int(r.readlines(1)[0])
    else:
        return 0
dataset/ETHPy150Open chango/inferno/inferno/lib/pid.py/get_retry_count/original