code: def generate_dataset(path, name):
      ### compute the orbits of each substructure in the list, as well as the node automorphism count
      subgraph_dicts = []
  
      edge_lists = []
      for k in range(3, 8 + 1):
          graphs_nx = nx.cycle_graph(k)
          edge_lists.append(list(graphs_nx.edges))
  
      for edge_list in edge_lists:
          (
              subgraph,
              orbit_partition,
              orbit_membership,
              aut_count,
          ) = induced_edge_automorphism_orbits(edge_list=edge_list)
          subgraph_dicts.append(
              {
                  "subgraph": subgraph,
                  "orbit_partition": orbit_partition,
                  "orbit_membership": orbit_membership,
                  "aut_count": aut_count,
              }
          )
  
      ### load and preprocess dataset
      dataset = DglGraphPropPredDataset(name=name, root=path)
      split_idx = dataset.get_idx_split()
  
      # computation of subgraph isomorphisms & creation of data structure
      graphs_dgl = list()
      split_idx["label"] = []
      for i, datapoint in tqdm(enumerate(dataset)):
          g, label = datapoint
          g = _prepare(g, subgraph_dicts)
          graphs_dgl.append(g)
          split_idx["label"].append(label)
  
      split_idx["label"] = torch.stack(split_idx["label"])
  
      return graphs_dgl, split_idx
  
file_path: dgl/examples/pytorch/ogb/directional_GSN/preprocessing.py
imports: import os
  import graph_tool
  import graph_tool.topology
  import networkx
  import numpy
  import torch
  from dgl.data.utils import load_graphs, save_graphs
  from ogb.graphproppred import DglGraphPropPredDataset
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: generate_dataset(path, name) and returns: graphs_dgl,  split_idx