code: def ptb_raw_data(data_path=None):
      """Load PTB raw data from data directory "data_path".
  
      Reads PTB text files, converts strings to integer ids,
      and performs mini-batching of the inputs.
  
      The PTB dataset comes from Tomas Mikolov's webpage:
  
      http://www.fit.vutbr.cz/~imikolov/rnnlm/simple-examples.tgz
  
      Args:
        data_path: string path to the directory where simple-examples.tgz has
          been extracted.
  
      Returns:
        tuple (train_data, valid_data, test_data, vocabulary)
        where each of the data objects can be passed to PTBIterator.
      """
  
      train_path = os.path.join(data_path, "ptb.train.txt")
      valid_path = os.path.join(data_path, "ptb.valid.txt")
      test_path = os.path.join(data_path, "ptb.test.txt")
  
      word_to_id = _build_vocab(train_path)
      train_data = _file_to_word_ids(train_path, word_to_id)
      valid_data = _file_to_word_ids(valid_path, word_to_id)
      test_data = _file_to_word_ids(test_path, word_to_id)
      vocabulary = len(word_to_id)
      return train_data, valid_data, test_data, vocabulary
  
file_path: tensorpack/examples/PennTreebank/reader.py
imports: from __future__ import absolute_import, division, print_function
  import collections
  import os
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: ptb_raw_data(data_path) and returns: train_data,  valid_data,  test_data,  vocabulary