code: def load_node_classification_train_data(
      config, str2id, term_file, terms, item_distribution
  ):
      train_data = []
      neg_samples = []
      with io.open(config.train_data, encoding=config.encoding) as f:
          for idx, line in enumerate(f):
              if idx % 100000 == 0:
                  log.info(
                      "%s readed %s lines" % (config.train_data, idx)
                  )
              slots = []
              col_idx = 0
              slots = line.strip("\n").split("\t")
              col = slots[0]
              label = int(slots[1])
              text = col[: config.max_seqlen]
              if text not in str2id:
                  str2id[text] = len(str2id)
                  term_file.write(str(col_idx) + "\t" + col + "\n")
                  item_distribution.append(0)
              src = str2id[text]
              train_data.append([src, label])
      train_data = np.array(train_data, dtype="int64")
      np.save(
          os.path.join(config.graph_work_path, "train_data.npy"),
          train_data,
      )
  
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  import io
  import os
  import sys
  import argparse
  import logging
  import multiprocessing
  from functools import partial
  from io import open
  import logging
  import numpy
  import tqdm
  import pgl
  from pgl.graph_kernel import alias_sample_build_table
  from pgl.utils.logger import log
  import paddle.fluid.dygraph
  import paddle.fluid
  from easydict import EasyDict
  import yaml
  from ernie.tokenizing_ernie import ErnieTokenizer
  from ernie.tokenizing_ernie import ErnieTinyTokenizer
  from ernie.modeling_ernie import ErnieModel
label_desc: Use image node_id 4 for calling a global function with example usage: load_node_classification_train_data(config, str2id, term_file, terms, item_distribution) without return types