Create a new disklabel (partition table) of label_type.

    Type should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac",
    "msdos", "pc98", or "sun".

    CLI Example:

    .. code-block:: bash

        salt '*' partition.mklabel /dev/sda msdos

def mklabel(device, label_type):
    '''
    Create a new disklabel (partition table) of label_type.

    Type should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac",
    "msdos", "pc98", or "sun".

    CLI Example:

    .. code-block:: bash

        salt '*' partition.mklabel /dev/sda msdos
    '''
    if label_type not in set([
        'aix', 'amiga', 'bsd', 'dvh', 'gpt', 'loop', 'mac', 'msdos', 'pc98', 'sun'
    ]):
        raise CommandExecutionError(
            'Invalid label_type passed to partition.mklabel'
        )

    cmd = ('parted', '-m', '-s', device, 'mklabel', label_type)
    out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    return out