def __getstate__(self):
        """Issue: https://github.com/pytorch/pytorch/issues/32351
        Need to set the tensor created in the __getstate__ function
         as object attribute to avoid potential bugs
        """
        self._pk_arrays = [
            F.zerocopy_from_dgl_ndarray(arr) for arr in self.arrays
        ]
        return self.version, self.meta, self._pk_arrays
Issue: https://github.com/pytorch/pytorch/issues/32351
        Need to set the tensor created in the __getstate__ function
         as object attribute to avoid potential bugs
        
python/dgl/heterograph_index.py