code: def test_basic_feature_store_homo():
      a = torch.tensor([[1, 2, 4], [2, 5, 3]])
      b = torch.tensor([[[1, 2], [3, 4]], [[2, 5], [4, 3]]])
      metadata = {"max_value": 3}
  
      features = {}
      features[("node", None, "a")] = gb.TorchBasedFeature(
          a, metadata=metadata
      )
      features[("node", None, "b")] = gb.TorchBasedFeature(b)
  
      feature_store = gb.BasicFeatureStore(features)
  
      # Test read the entire feature.
      assert torch.equal(
          feature_store.read("node", None, "a"),
          torch.tensor([[1, 2, 4], [2, 5, 3]]),
      )
      assert torch.equal(
          feature_store.read("node", None, "b"),
          torch.tensor([[[1, 2], [3, 4]], [[2, 5], [4, 3]]]),
      )
  
      # Test read with ids.
      assert torch.equal(
          feature_store.read("node", None, "a", torch.tensor([0])),
          torch.tensor([[1, 2, 4]]),
      )
      assert torch.equal(
          feature_store.read("node", None, "b", torch.tensor([0])),
          torch.tensor([[[1, 2], [3, 4]]]),
      )
  
      # Test get the size of the entire feature.
      assert feature_store.size("node", None, "a") == torch.Size([3])
      assert feature_store.size("node", None, "b") == torch.Size([2, 2])
  
      # Test get metadata of the feature.
      assert feature_store.metadata("node", None, "a") == metadata
      assert feature_store.metadata("node", None, "b") == {}
  
      # Test get keys of the features.
      assert feature_store.keys() == [
          ("node", None, "a"),
          ("node", None, "b"),
      ]
  
imports: import pytest
  import torch
  from dgl import graphbolt
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic_feature_store_homo() without return types