def save_bundle(bundle, path):
    """helper function to write a STIX bundle to file"""
    print(f"{'overwriting' if os.path.exists(path) else 'writing'} {path}... ", end="", flush=True)
    with open(path, "w", encoding="utf-8") as outfile:
        bundle.fp_serialize(outfile, indent=4, sort_keys=True, ensure_ascii=False)
    print("done")
helper function to write a STIX bundle to file
src/parse.py