code: def _build_dataloader(self):
      dataset = CNNDataset(
          root_dir=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["root_dir"],
          merge_strategy=self.config["graph_construction_args"][
              "graph_construction_private"
          ]["merge_strategy"],
          edge_strategy=self.config["graph_construction_args"][
              "graph_construction_private"
          ]["edge_strategy"],
          max_word_vocab_size=self.config["top_word_vocab"],
          min_word_vocab_freq=self.config["min_word_freq"],
          word_emb_size=self.config["word_emb_size"],
          share_vocab=self.config["share_vocab"],
          lower_case=self.config["vocab_lower_case"],
          seed=self.config["seed"],
          topology_subdir=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["topology_subdir"],
          graph_name=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["graph_name"],
          thread_number=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["thread_number"],
          port=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["port"],
          timeout=self.config["graph_construction_args"][
              "graph_construction_share"
          ]["timeout"],
          tokenizer=None,
      )
  
      dataset.train = dataset.train[: self.config["n_samples"]]
      dataset.val = dataset.val[: self.config["n_samples"]]
      dataset.test = dataset.test[: self.config["n_samples"]]
  
      self.train_dataloader = DataLoader(
          dataset.train,
          batch_size=self.config["batch_size"],
          shuffle=True,
          num_workers=self.config["num_workers"],
          collate_fn=dataset.collate_fn,
      )
      self.val_dataloader = DataLoader(
          dataset.val,
          batch_size=self.config["batch_size"],
          shuffle=False,
          num_workers=self.config["num_workers"],
          collate_fn=dataset.collate_fn,
      )
      self.test_dataloader = DataLoader(
          dataset.test,
          batch_size=self.config["batch_size"],
          shuffle=False,
          num_workers=self.config["num_workers"],
          collate_fn=dataset.collate_fn,
      )
      self.vocab = dataset.vocab_model
      self.num_train = len(dataset.train)
      self.num_val = len(dataset.val)
      self.num_test = len(dataset.test)
      print(
          "Train size: {}, Val size: {}, Test size: {}".format(
              self.num_train, self.num_val, self.num_test
          )
      )
      self.logger.write(
          "Train size: {}, Val size: {}, Test size: {}".format(
              self.num_train, self.num_val, self.num_test
          )
      )
  
imports: import argparse
  import os
  import time
  import numpy
  import torch
  import torch.backends.cudnn
  import torch.nn
  import torch.optim
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from torch.utils.data import DataLoader
  from graph4nlp.pytorch.datasets.cnn import CNNDataset
  from graph4nlp.pytorch.models.graph2seq import Graph2Seq
  from graph4nlp.pytorch.models.graph2seq_loss import Graph2SeqLoss
  from graph4nlp.pytorch.modules.config import get_basic_args
  from graph4nlp.pytorch.modules.evaluation.rouge import ROUGE
  from graph4nlp.pytorch.modules.graph_embedding_initialization.embedding_construction import WordEmbedding
  from graph4nlp.pytorch.modules.utils import constants
  from graph4nlp.pytorch.modules.utils.config_utils import get_yaml_config, update_values
  from graph4nlp.pytorch.modules.utils.copy_utils import prepare_ext_vocab
  from graph4nlp.pytorch.modules.utils.generic_utils import EarlyStopping, to_cuda
  from graph4nlp.pytorch.modules.utils.logger import Logger
  from graph4nlp.pytorch.modules.utils.summarization_utils import wordid2str
label_desc: Use image node_id 2 for calling the ModelHandler obj's underlying member method code with example usage: obj._build_dataloader() without return types