def wait(self):
        """Returns the stored value when invoked."""
        sampled_subgraph = self.sampled_subgraph
        index = self.index
        # Ensure there is no memory leak.
        self.sampled_subgraph = self.index = None

        if isinstance(index, dict):
            for k in list(index.keys()):
                index[k] = index[k].wait()
        else:
            index = index.wait()

        return type(sampled_subgraph)(*_slice_subgraph(sampled_subgraph, index))
Returns the stored value when invoked.
python/dgl/graphbolt/sampled_subgraph.py