def METHOD_NAME(path_variants, suite):
    with open(path_variants, "w", encoding="utf-8") as variants_file:
        variants = []
        variants += suite.variants.dump()
        json.dump(variants, variants_file, default=json_bad_variants_obj)
        variants_file.flush()
        os.fsync(variants_file)