code: def test_base_storage():
      storage = BaseStorage()
      assert storage._mapping == {}
      storage.x = torch.zeros(1)
      storage.y = torch.ones(1)
      assert len(storage) == 2
      assert storage._mapping == {
          "x": torch.zeros(1),
          "y": torch.ones(1),
      }
      assert storage.x is not None
      assert storage.y is not None
  
      assert torch.allclose(storage.get("x", None), storage.x)
      assert torch.allclose(storage.get("y", None), storage.y)
      assert storage.get("z", 2) == 2
      assert storage.get("z", None) is None
      assert len(list(storage.keys("x", "y", "z"))) == 2
      assert len(list(storage.keys("x", "y", "z"))) == 2
      assert len(list(storage.values("x", "y", "z"))) == 2
      assert len(list(storage.items("x", "y", "z"))) == 2
  
      del storage.y
      assert len(storage) == 1
      assert storage.x is not None
  
      storage = BaseStorage({"x": torch.zeros(1)})
      assert len(storage) == 1
      assert storage.x is not None
  
      storage = BaseStorage(x=torch.zeros(1))
      assert len(storage) == 1
      assert storage.x is not None
  
      storage = BaseStorage(x=torch.zeros(1))
      copied_storage = copy.copy(storage)
      assert storage == copied_storage
      assert id(storage) != id(copied_storage)
      assert storage.x.data_ptr() == copied_storage.x.data_ptr()
      assert int(storage.x) == 0
      assert int(copied_storage.x) == 0
  
      deepcopied_storage = copy.deepcopy(storage)
      assert storage == deepcopied_storage
      assert id(storage) != id(deepcopied_storage)
      assert storage.x.data_ptr() != deepcopied_storage.x.data_ptr()
      assert int(storage.x) == 0
      assert int(deepcopied_storage.x) == 0
  
      with pytest.raises(
          AttributeError, match="has no attribute 'asdf'"
      ):
          storage.asdf
  
imports: import copy
  from typing import Any
  import pytest
  import torch
  from torch_geometric.data.storage import BaseStorage
label_desc: Use image node_id 1 for calling a global function with example usage: test_base_storage() without return types