def METHOD_NAME(fn):
    wrong = 0
    right = 0
    for line in open(fn,"r"):
        if line[0]=='#':
            m = re.search("# Sampled (\d+) out of (\d+)",line)
            if m:
                sampled = int(m.group(1))
                total = int(m.group(2))
        elif line[0] in '-_xzn' :
            wrong += 1
        elif line[0] in '+=y' :
            right += 1
        else:
            if not args.quiet: print("No classification:",line,end='');
    return {"fn":os.path.basename(fn),
            "total":total,
            "sampled":sampled,
            "sampling_rate":sampled/total if total>0 else 0,
            "accuracy":(right/sampled if sampled>0 else 1),
            "error_rate":(wrong/sampled if sampled>0 else 0),
            "uncertainity":(sampled-(right+wrong))/sampled if sampled>0 else 0}