human
Complete the below
def _download_dataset(dataset_dir):

    ''''Downloads MNIST locally.
    Args:
    dataset_dir: The directory where the temporary files are stored.'
    '''

Can you provide a the Python code you requested?
assistant
#Here is the Python code you requested.
    for filename in [_TRAIN_DATA_FILENAME, _TRAIN_LABELS_FILENAME, _TEST_DATA_FILENAME, _TEST_LABELS_FILENAME]:
        filepath = os.path.join(dataset_dir, filename)
        if (not os.path.exists(filepath)):
            print(('Downloading    file    %s...' % filename))
            def _progress(count, block_size, total_size):
                sys.stdout.write(('\r>>    Downloading    %.1f%%' % ((float((count * block_size)) / float(total_size)) * 100.0)))
                sys.stdout.flush()
            (filepath, _) = urllib.request.urlretrieve((_DATA_URL + filename), filepath, _progress)
            print()
            with tf.gfile.GFile(filepath) as f:
                size = f.size()
            print('Successfully    downloaded', filename, size, 'bytes.')