def set_speed_num(speed_num: int) -> str:
    """
    Set the speed number. Part of the supported Knitout extensions.
    Valid speed numbers are positive integers in the range 0 - 15
    Raises ValueError
    """
    if 0 <= speed_num <= 15:
        return 'x-speed-number {}'.format(speed_num)
    else:
        raise ValueError('int speed_num (val: {}) must in range 0-15.'.format(speed_num))