code: def test_basic_feature_store_errors():
      a = torch.tensor([3, 2, 1])
      b = torch.tensor([[1, 2, 4], [2, 5, 3]])
  
      features = {}
      # Test error when dimension of the value is illegal.
      with pytest.raises(
          AssertionError,
          match=rf"dimension of torch_feature in TorchBasedFeature must be "
          rf"greater than 1, but got {a.dim()} dimension.",
      ):
          features[("node", "paper", "a")] = gb.TorchBasedFeature(a)
      features[("node", "author", "b")] = gb.TorchBasedFeature(b)
  
      feature_store = gb.BasicFeatureStore(features)
  
      # Test error when key does not exist.
      with pytest.raises(KeyError):
          feature_store.read("node", "paper", "b")
  
      # Test error when at least one id is out of bound.
      with pytest.raises(IndexError):
          feature_store.read(
              "node", "author", "b", torch.tensor([0, 3])
          )
  
imports: import pytest
  import torch
  from dgl import graphbolt
label_desc: Use image node_id 3 for calling a global function with example usage: test_basic_feature_store_errors() without return types