<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_labels(input_dir):
 """Get a list of labels from preprocessed output dir."""

  data_dir = _get_latest_data_dir(input_dir)
  labels_file = os.path.join(data_dir, 'labels')
  with file_io.FileIO(labels_file, 'r') as f:
    labels = f.read().rstrip().split('\n')
  return labels