code: def build_from_train_val(cls, train, val, test=None):
      dataset = cls(
          train.graphs + val.graphs, train.labels + val.labels
      )
      dataset.train_index = list(range(len(train)))
      dataset.val_index = list(range(len(train), len(train) + len(val)))
      if test is not None:
          dataset.test_index = list(
              range(
                  len(train) + len(val),
                  len(train) + len(val) + len(test),
              )
          )
      dataset.train_split = train
      dataset.val_split = val
      if test is not None:
          dataset.test_split = test
      return dataset
  
file_path: AutoGL/test/performance/graph_classification/dgl/trainer.py
imports: import os
  import torch
  import random
  import numpy
  from dgl.data import GINDataset
  from dgl.dataloading import GraphDataLoader
  from autogl.datasets import utils
  from autogl.module.train import GraphClassificationFullTrainer
  from autogl.solver.utils import set_seed
  from helper import get_encoder_decoder_hp
  import logging
label_desc: Use image node_id 4 for calling the DatasetAbstraction obj's underlying member method code with example usage: obj.build_from_train_val(cls, train, val, test) and returns: dataset