code: def test_edge_index(tmp_path, Database):
      kwargs = (
          dict(name="test_table") if Database == SQLiteDatabase else {}
      )
  
      path = osp.join(tmp_path, "tuple_storage.db")
      schema = dict(dtype=torch.long, is_edge_index=True)
      db = Database(path, schema=schema, **kwargs)
      assert db.schema == {
          0: TensorInfo(
              dtype=torch.long, size=(2, -1), is_edge_index=True
          ),
      }
  
      adj1 = EdgeIndex(
          [[0, 1, 1, 2], [1, 0, 2, 1]],
          sparse_size=(3, 3),
          sort_order="row",
          is_undirected=True,
      )
      adj2 = EdgeIndex(
          [[1, 0, 2, 1, 3, 2], [0, 1, 1, 2, 2, 3]],
          sparse_size=(4, 4),
          sort_order="col",
      )
      adj3 = EdgeIndex([[], []], dtype=torch.long)
  
      db.insert(0, adj1)
      db.multi_insert([1, 2], [adj2, adj3])
  
      out1 = db.get(0)
      out2, out3 = db.multi_get([1, 2])
  
      for out, adj in zip([out1, out2, out3], [adj1, adj2, adj3]):
          assert adj.equal(out)
          assert adj.dtype == out.dtype
          assert adj.sparse_size() == out.sparse_size()
          assert adj.sort_order == out.sort_order
          assert adj.is_undirected == out.is_undirected
  
      db.close()
  
file_path: pytorch_geometric/test/data/test_database.py
imports: import math
  import os.path
  import pytest
  import torch
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, RocksDatabase, SQLiteDatabase
  from torch_geometric.data.database import TensorInfo
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import has_package, withPackage
label_desc: Use image node_id 3 for calling a global function with example usage: test_edge_index(tmp_path, Database) without return types