def walk_sampler(self, g):
        """Node ID sampler for random walk sampler"""
        num_roots, walk_length = self.budget
        sampled_roots = torch.randint(0, g.num_nodes(), (num_roots,))
        traces, types = random_walk(g, nodes=sampled_roots, length=walk_length)
        sampled_nodes, _, _, _ = pack_traces(traces, types)
        return sampled_nodes.unique().type(g.idtype)
Node ID sampler for random walk sampler
python/dgl/dataloading/graphsaint.py