import json, sys
# Normalized path records exported under your licensed Wiz API contract.
for path in json.load(open(sys.argv[1], encoding="utf-8")):
    complete = all(path.get(k) for k in
        ("pathId", "nodes", "edges", "observedAt", "sourceRef"))
    print(json.dumps({"pathId": path.get("pathId"),
        "nodeCount": len(path.get("nodes", [])),
        "reviewRequired": not complete,
        "automaticPAINAssignment": False}))
