def _create_train_test_split(training_images_list, label_images_list, train_split_percent):
    """
    Divides the training images folder into training images and test images, with train_split
    percent being the percent of images in training set and the rest in test set. Note that,
    the Nerve Segmentation Challenge gives a set of images in the 'test' folder. That folder
    is not touched at all during the training process. It is referred to as the validation
    data throughout the documentation of this code. Test images in our case is a fraction of
    the images in the 'train' folder
    :param training_images_list: list of images from the training folder
    :param label_images_list: list of label images from the training folder
    :param train_split_percent: percentage of images used for training
    :return:
    """
    assert len(training_images_list) == len(label_images_list), ('Number of training images and label '
                                                                 'images must be same. Please make sure '
                                                                 'equal number of training images and '
                                                                 'label images')

    split_index = int(len(training_images_list) * train_split_percent)
    train_split_images_list = training_images_list[0:split_index]
    train_split_labels_list = label_images_list[0:split_index]
    test_split_images_list = training_images_list[split_index:len(training_images_list)]
    test_split_labels_list = label_images_list[split_index:len(training_images_list)]
    print('Finished splitting data into %s training images and %s '
          'test images' % (len(train_split_images_list), len(test_split_images_list)))
    return train_split_images_list, train_split_labels_list, test_split_images_list, test_split_labels_list