code: def test_save_and_load(dtype, device, tmp_path):
      kwargs = dict(dtype=dtype, device=device)
      adj = EdgeIndex(
          [[0, 1, 1, 2], [1, 0, 2, 1]], sort_order="row", **kwargs
      )
      adj.fill_cache_()
  
      assert adj.sort_order == "row"
      assert adj._indptr is not None
  
      path = osp.join(tmp_path, "edge_index.pt")
      torch.save(adj, path)
      out = torch.load(path)
  
      assert isinstance(out, EdgeIndex)
      assert out.equal(adj)
      assert out.sort_order == "row"
      assert out._indptr.equal(adj._indptr)
  
imports: import os.path
  import warnings
  from typing import List, Optional
  import pytest
  import torch
  from torch import Tensor, tensor
  import torch_geometric
  from torch_geometric import EdgeIndex
  from torch_geometric.edge_index import SUPPORTED_DTYPES, ReduceType, SortReturnType, _scatter_spmm, _torch_sparse_spmm, _TorchSPMM, set_tuple_item
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import onlyCUDA, onlyLinux, withCUDA, withoutExtensions, withPackage
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import scatter
label_desc: Use image node_id 31 for calling a global function with example usage: test_save_and_load(dtype, device, tmp_path) without return types