def expand_indptr_fake(indptr, dtype, node_ids, output_size):
        """Fake implementation of expand_indptr for torch.compile() support."""
        if output_size is None:
            output_size = torch.library.get_ctx().new_dynamic_size()
        if dtype is None:
            dtype = node_ids.dtype
        return indptr.new_empty(output_size, dtype=dtype)
Fake implementation of expand_indptr for torch.compile() support.
python/dgl/graphbolt/base.py