from pathlib import Path
from datetime import datetime
import json
x=json.loads((Path(__file__).parent/'cases.json').read_text(encoding='utf-8'));t=x['target'];r=[e for e in x['events'] if e['pid']==t['pid'] and e['path']==t['path'] and 0<=(datetime.fromisoformat(e['time'])-datetime.fromisoformat(t['start'])).total_seconds()<=10];assert len(r)==2;print(json.dumps({'candidates':r,'cause':'not_proven'},indent=2))
