def wait(self):
            """Returns the stored value when invoked."""
            results = self.future.wait() if async_op else self.future
            ntypes = self.ntypes
            nums = self.nums
            # Ensure there is no memory leak.
            self.future = self.ntypes = self.nums = None

            unique, compacted, offsets = {}, {}, {}
            for ntype, result in zip(ntypes, results):
                (
                    unique[ntype],
                    concat_compacted,
                    _,
                    offsets[ntype],
                ) = result
                compacted[ntype] = list(concat_compacted.split(nums[ntype]))
            if is_heterogeneous:
                return unique, compacted, offsets
            else:
                return (
                    unique[homo_ntype],
                    compacted[homo_ntype],
                    offsets[homo_ntype],
                )
Returns the stored value when invoked.
python/dgl/graphbolt/internal/sample_utils.py