code: def test_basic_graph_store():
      data = HeteroData()
  
      def assert_equal_tensor_tuple(expected, actual):
          assert len(expected) == len(actual)
          for i in range(len(expected)):
              assert torch.equal(expected[i], actual[i])
  
      # We put all three tensor types: COO, CSR, and CSC, and we get them back
      # to confirm that `GraphStore` works as intended.
      coo = (torch.tensor([0, 1]), torch.tensor([1, 2]))
      csr = (torch.tensor([0, 1, 2, 2]), torch.tensor([1, 2]))
      csc = (torch.tensor([0, 1]), torch.tensor([0, 0, 1, 2]))
  
      # Put:
      data.put_edge_index(
          coo, layout="coo", edge_type=("a", "to", "b"), size=(3, 3)
      )
      data.put_edge_index(
          csr, layout="csr", edge_type=("a", "to", "c"), size=(3, 3)
      )
      data.put_edge_index(
          csc, layout="csc", edge_type=("b", "to", "c"), size=(3, 3)
      )
  
      # Get:
      assert_equal_tensor_tuple(
          coo,
          data.get_edge_index(layout="coo", edge_type=("a", "to", "b")),
      )
      assert_equal_tensor_tuple(
          csr,
          data.get_edge_index(layout="csr", edge_type=("a", "to", "c")),
      )
      assert_equal_tensor_tuple(
          csc,
          data.get_edge_index(layout="csc", edge_type=("b", "to", "c")),
      )
  
      # Get attrs:
      edge_attrs = data.get_all_edge_attrs()
      assert len(edge_attrs) == 3
  
      # Remove:
      coo, csr, csc = edge_attrs
      data.remove_edge_index(coo)
      data.remove_edge_index(csr)
      data.remove_edge_index(csc)
      assert len(data.get_all_edge_attrs()) == 0
  
imports: import copy
  import pytest
  import torch
  from torch_geometric.data import HeteroData
  from torch_geometric.data.storage import EdgeStorage
  from torch_geometric.testing import get_random_edge_index, get_random_tensor_frame, withPackage
  from torch_geometric.typing import TensorFrame
label_desc: Use image node_id 17 for calling a global function with example usage: test_basic_graph_store() without return types