def process(self):
        """process raw data to graph, labels and masks"""
        with open(os.path.join(self.raw_path, "data.json")) as f:
            data = json.load(f)
        features = F.tensor(np.array(data["features"]), dtype=F.float32)
        labels = F.tensor(np.array(data["labels"]), dtype=F.int64)

        train_masks = np.array(data["train_masks"], dtype=bool).T
        val_masks = np.array(data["val_masks"], dtype=bool).T
        stopping_masks = np.array(data["stopping_masks"], dtype=bool).T
        test_mask = np.array(data["test_mask"], dtype=bool)

        edges = [[(i, j) for j in js] for i, js in enumerate(data["links"])]
        edges = np.array(list(itertools.chain(*edges)))
        src, dst = edges[:, 0], edges[:, 1]

        g = graph((src, dst))
        g = to_bidirected(g)

        g.ndata["feat"] = features
        g.ndata["label"] = labels
        g.ndata["train_mask"] = generate_mask_tensor(train_masks)
        g.ndata["val_mask"] = generate_mask_tensor(val_masks)
        g.ndata["stopping_mask"] = generate_mask_tensor(stopping_masks)
        g.ndata["test_mask"] = generate_mask_tensor(test_mask)

        g = reorder_graph(
            g,
            node_permute_algo="rcmk",
            edge_permute_algo="dst",
            store_ids=False,
        )

        self._graph = g
process raw data to graph, labels and masks
python/dgl/data/wikics.py