Toggle the state of <flag> on <device>. Valid flags are the same
    as the disk_set command.

    CLI Example:

    .. code-block:: bash

        salt '*' partition.disk_toggle /dev/sda pmbr_boot

def disk_toggle(device, flag):
    '''
    Toggle the state of <flag> on <device>. Valid flags are the same
    as the disk_set command.

    CLI Example:

    .. code-block:: bash

        salt '*' partition.disk_toggle /dev/sda pmbr_boot
    '''
    _validate_device(device)

    if flag not in VALID_DISK_FLAGS:
        raise CommandExecutionError('Invalid flag passed to partition.disk_toggle')

    cmd = ['parted', '-m', '-s', device, 'disk_toggle', flag]
    out = __salt__['cmd.run'](cmd).splitlines()
    return out