def METHOD_NAME(devices, options):
    device = devices["device"]["path"]
    ptuuid = options["uuid"]
    pttype = options["label"]
    partitions = options.get("partitions")
    parts = [partition_from_json(p) for p in partitions]
    pt = PartitionTable(pttype, ptuuid, parts)
    pt.write_to(device)
    subprocess.run(["sfdisk", "--json", device],
                   encoding='utf8',
                   check=False)