def process(self):
        """Parse node/edge data from CSV files and construct DGL.Graphs"""
        from .csv_dataset_base import (
            DGLGraphConstructor,
            EdgeData,
            GraphData,
            NodeData,
        )

        meta_yaml = self.meta_yaml
        base_dir = self.raw_dir
        node_data = []
        for meta_node in meta_yaml.node_data:
            if meta_node is None:
                continue
            ntype = meta_node.ntype
            data_parser = (
                self.ndata_parser
                if callable(self.ndata_parser)
                else self.ndata_parser.get(ntype, self.default_data_parser)
            )
            ndata = NodeData.load_from_csv(
                meta_node,
                base_dir=base_dir,
                separator=meta_yaml.separator,
                data_parser=data_parser,
            )
            node_data.append(ndata)
        edge_data = []
        for meta_edge in meta_yaml.edge_data:
            if meta_edge is None:
                continue
            etype = tuple(meta_edge.etype)
            data_parser = (
                self.edata_parser
                if callable(self.edata_parser)
                else self.edata_parser.get(etype, self.default_data_parser)
            )
            edata = EdgeData.load_from_csv(
                meta_edge,
                base_dir=base_dir,
                separator=meta_yaml.separator,
                data_parser=data_parser,
            )
            edge_data.append(edata)
        graph_data = None
        if meta_yaml.graph_data is not None:
            meta_graph = meta_yaml.graph_data
            data_parser = (
                self.default_data_parser
                if self.gdata_parser is None
                else self.gdata_parser
            )
            graph_data = GraphData.load_from_csv(
                meta_graph,
                base_dir=base_dir,
                separator=meta_yaml.separator,
                data_parser=data_parser,
            )
        # construct graphs
        self.graphs, self.data = DGLGraphConstructor.construct_graphs(
            node_data, edge_data, graph_data
        )
        if len(self.data) == 1:
            self.labels = list(self.data.values())[0]
Parse node/edge data from CSV files and construct DGL.Graphs
python/dgl/data/csv_dataset.py