def mkpart(device, part_type, fs_type=None, start=None, end=None):
    '''
    Make a part_type partition for filesystem fs_type, beginning at start and
    ending at end (by default in megabytes).  part_type should be one of
    "primary", "logical", or "extended".

    CLI Examples:

    .. code-block:: bash

        salt '*' partition.mkpart /dev/sda primary fs_type=fat32 start=0 end=639
        salt '*' partition.mkpart /dev/sda primary start=0 end=639
    '''
    if part_type not in set(['primary', 'logical', 'extended']):
        raise CommandExecutionError(
            'Invalid part_type passed to partition.mkpart'
        )

    if not _is_fstype(fs_type):
        raise CommandExecutionError(
            'Invalid fs_type passed to partition.mkpart'
        )

    if start is not None and end is not None:
        _validate_partition_boundary(start)
        _validate_partition_boundary(end)

    if start is None:
        start = ''

    if end is None:
        end = ''

    if fs_type:
        cmd = ('parted', '-m', '-s', '--', device, 'mkpart', part_type, fs_type, start, end)
    else:
        cmd = ('parted', '-m', '-s', '--', device, 'mkpart', part_type, start, end)

    out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    return out