def __setstate__(self, state):
        """The pickle state of GraphIndex is defined as a triplet
        (num_nodes, readonly, src_nodes, dst_nodes)
        """
        # Pickle compatibility check
        # TODO: we should store a storage version number in later releases.
        if isinstance(state, tuple) and len(state) == 5:
            dgl_warning(
                "The object is pickled pre-0.4.2.  Multigraph flag is ignored in 0.4.3"
            )
            num_nodes, _, readonly, src, dst = state
        elif isinstance(state, tuple) and len(state) == 4:
            # post-0.4.3.
            num_nodes, readonly, src, dst = state
        else:
            raise IOError("Unrecognized storage format.")

        self._cache = {}
        self._readonly = readonly
        self.__init_handle_by_constructor__(
            _CAPI_DGLGraphCreate,
            src.todgltensor(),
            dst.todgltensor(),
            int(num_nodes),
            readonly,
        )
The pickle state of GraphIndex is defined as a triplet
        (num_nodes, readonly, src_nodes, dst_nodes)
        
python/dgl/graph_index.py