class_docstr: BaseDataset for PGLBox.
      
code: def generate_dataset(self, config, chunk_index, pass_num):
      sage_mode = config.sage_mode if config.sage_mode else False
      fs_name = config.fs_name if config.fs_name is not None else ""
      fs_ugi = config.fs_ugi if config.fs_ugi is not None else ""
  
      str_samples = util.sample_list_to_str(sage_mode, config.samples)
      str_infer_samples = util.sample_list_to_str(
          sage_mode, config.infer_samples
      )
  
      excluded_train_pair = (
          config.excluded_train_pair
          if config.excluded_train_pair
          else ""
      )
      pair_label = config.pair_label if config.pair_label else ""
      infer_node_type = (
          config.infer_node_type if config.infer_node_type else ""
      )
  
      cap_and_chunks = self.compute_chunks_and_cap(config)
  
      get_degree = sage_mode and (
          config.use_degree_norm if config.use_degree_norm else False
      )
  
      graph_config = {
          "walk_len": config.walk_len,
          "walk_degree": config.walk_times,
          "once_sample_startid_len": config.batch_size,
          "sample_times_one_chunk": cap_and_chunks[
              "train_sample_times_one_chunk"
          ],
          "window": config.win_size,
          "debug_mode": config.debug_mode,
          "batch_size": config.batch_size,
          "meta_path": config.meta_path,
          "gpu_graph_training": not self.is_predict,
          "sage_mode": sage_mode,
          "samples": str_samples,
          "train_table_cap": cap_and_chunks["train_pass_cap"],
          "infer_table_cap": cap_and_chunks["infer_pass_cap"],
          "excluded_train_pair": excluded_train_pair,
          "infer_node_type": infer_node_type,
          "get_degree": get_degree,
          "weighted_sample": config.weighted_sample,
          "return_weight": config.return_weight,
          "pair_label": pair_label,
      }
  
      first_node_type = util.get_first_node_type(config.meta_path)
      graph_config["first_node_type"] = first_node_type
  
      if self.is_predict:
          graph_config["walk_len"] = 1
          graph_config["walk_degree"] = 1
          graph_config["batch_size"] = config.infer_batch_size
          graph_config[
              "once_sample_startid_len"
          ] = config.infer_batch_size
          graph_config["samples"] = str_infer_samples
          graph_config["sample_times_one_chunk"] = cap_and_chunks[
              "infer_sample_times_one_chunk"
          ]
  
      dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
      dataset.set_feed_type("SlotRecordInMemoryDataFeed")
      dataset.set_use_var(self.holder_list)
      dataset.set_graph_config(graph_config)
  
      dataset.set_batch_size(
          1
      )  # Fixed Don't Change. Batch Size is not config here.
      dataset.set_thread(len(get_cuda_places()))
  
      dataset.set_hdfs_config(fs_name, fs_ugi)
  
      dataset._set_use_ps_gpu(self.embedding.parameter_server)
      file_list = self.get_file_list(chunk_index)
      dataset.set_filelist(file_list)
      dataset.set_pass_id(pass_num)
      with open("datafeed.pbtxt", "w") as fout:
          fout.write(dataset.desc())
      return dataset
  
imports: import os
  import time
  import threading
  import traceback
  import numpy
  import paddle
  from paddle.distributed import fleet
  import paddle.fluid
  from pgl.utils.logger import log
  import util
  import helper
  from place import get_cuda_places
  import models.model_util
label_desc: Use image node_id 3 for calling the BaseDataset obj's underlying member method code with example usage: obj.generate_dataset(config, chunk_index, pass_num) and returns: dataset