code: def get_other_text_dataset(
      name, vocab=None, shrink=1, char_based=False, seed=777
  ):
      assert name in [
          "TREC",
          "stsa.binary",
          "stsa.fine",
          "custrev",
          "mpqa",
          "rt-polarity",
          "subj",
      ]
      datasets = download_other_dataset(name)
      train = read_other_dataset(
          datasets[0], shrink=shrink, char_based=char_based
      )
      if len(datasets) == 2:
          test = read_other_dataset(
              datasets[1], shrink=shrink, char_based=char_based
          )
      else:
          numpy.random.seed(seed)
          alldata = numpy.random.permutation(train)
          train = alldata[: -len(alldata) // 10]
          test = alldata[-len(alldata) // 10 :]
  
      if vocab is None:
          print("constract vocabulary based on frequency")
          vocab = make_vocab(train)
  
      train = transform_to_array(train, vocab)
      test = transform_to_array(test, vocab)
  
      return train, test, vocab
  
imports: import csv
  import glob
  import io
  import os
  import shutil
  import sys
  import tarfile
  import tempfile
  import numpy
  import chainer
  from nlp_utils import make_vocab
  from nlp_utils import normalize_text
  from nlp_utils import split_text
  from nlp_utils import transform_to_array
label_desc: Use image node_id 9 for calling a global function with example usage: get_other_text_dataset(name, vocab, shrink, char_based, seed) and returns: train,  test,  vocab