<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_mnist_dataset(mode='supervised', one_hot=True):
 """Load the MNIST handwritten digits dataset. :param mode: 'supervised' or 'unsupervised' mode :param one_hot: whether to get one hot encoded labels :return: train, validation, test data: for (X, y) if 'supervised', for (X) if 'unsupervised' """

    mnist = input_data.read_data_sets("MNIST_data/", one_hot=one_hot)

    # Training set
    trX = mnist.train.images
    trY = mnist.train.labels

    # Validation set
    vlX = mnist.validation.images
    vlY = mnist.validation.labels

    # Test set
    teX = mnist.test.images
    teY = mnist.test.labels

    if mode == 'supervised':
        return trX, trY, vlX, vlY, teX, teY

    elif mode == 'unsupervised':
        return trX, vlX, teX