code: def test_sorted_graph_store():
      edge_index_sorted = torch.tensor(
          [[1, 7, 5, 6, 1], [0, 0, 1, 1, 2]]
      )
      edge_id_sorted = torch.tensor([0, 1, 2, 3, 4])
  
      edge_index = torch.tensor([[1, 5, 7, 1, 6], [0, 1, 0, 2, 1]])
      edge_id = torch.tensor([0, 2, 1, 4, 3])
  
      graph_store = LocalGraphStore.from_data(
          edge_id,
          edge_index,
          num_nodes=8,
          is_sorted=False,
      )
      assert torch.equal(
          graph_store.get_edge_index(edge_type=None, layout="coo"),
          edge_index_sorted,
      )
      assert torch.equal(
          graph_store.get_edge_id(edge_type=None, layout="coo"),
          edge_id_sorted,
      )
  
      edge_type = ("paper", "to", "paper")
      edge_index_dict = {edge_type: edge_index}
      edge_id_dict = {edge_type: edge_id}
  
      graph_store = LocalGraphStore.from_hetero_data(
          edge_id_dict,
          edge_index_dict,
          num_nodes_dict={"paper": 8},
          is_sorted=False,
      )
      assert torch.equal(
          graph_store.get_edge_index(edge_type, layout="coo"),
          edge_index_sorted,
      )
      assert torch.equal(
          graph_store.get_edge_id(edge_type, layout="coo"),
          edge_id_sorted,
      )
  
imports: import torch
  from torch_geometric.distributed import LocalGraphStore
  from torch_geometric.testing import get_random_edge_index
label_desc: Use image node_id 4 for calling a global function with example usage: test_sorted_graph_store() without return types