code: def test_basic_feature_store():
      data = HeteroData()
      x = torch.randn(20, 20)
  
      # Put tensor:
      assert data.put_tensor(
          copy.deepcopy(x),
          group_name="paper",
          attr_name="x",
          index=None,
      )
      assert torch.equal(data["paper"].x, x)
  
      # Put (modify) tensor slice:
      x[15:] = 0
      data.put_tensor(
          0,
          group_name="paper",
          attr_name="x",
          index=slice(15, None, None),
      )
  
      # Get tensor:
      out = data.get_tensor(
          group_name="paper", attr_name="x", index=None
      )
      assert torch.equal(x, out)
  
      # Get tensor size:
      assert data.get_tensor_size(
          group_name="paper", attr_name="x"
      ) == (20, 20)
  
      # Get tensor attrs:
      data["paper"].num_nodes = 20  # don't include, not a tensor attr
      data["paper"].bad_attr = torch.randn(
          10, 20
      )  # don't include, bad cat_dim
  
      tensor_attrs = data.get_all_tensor_attrs()
      assert len(tensor_attrs) == 1
      assert tensor_attrs[0].group_name == "paper"
      assert tensor_attrs[0].attr_name == "x"
  
      # Remove tensor:
      assert "x" in data["paper"].__dict__["_mapping"]
      data.remove_tensor(group_name="paper", attr_name="x", index=None)
      assert "x" not in data["paper"].__dict__["_mapping"]
  
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 15 for calling a global function with example usage: test_basic_feature_store() without return types