code: def read_dbpedia(tf, split, shrink=1, char_based=False):
      dataset = []
      f = tf.extractfile("dbpedia_csv/{}.csv".format(split))
      if sys.version_info > (3, 0):
          f = io.TextIOWrapper(f, encoding="utf-8")
      for i, (label, title, text) in enumerate(csv.reader(f)):
          if i % shrink != 0:
              continue
          label = int(label) - 1  # Index begins from 1
          tokens = split_text(normalize_text(text), char_based)
          dataset.append((tokens, label))
      return dataset
  
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 2 for calling a global function with example usage: read_dbpedia(tf, split, shrink, char_based) and returns: dataset