def wait(self):
        """Returns the stored value when invoked."""
        result = self.result
        # Ensure there is no memory leak.
        self.result = None
        return result
Returns the stored value when invoked.
python/dgl/graphbolt/subgraph_sampler.py