code: def test_database_single_tensor(tmp_path, Database, batch_size):
      kwargs = dict(path=osp.join(tmp_path, "storage.db"))
      if Database == SQLiteDatabase:
          kwargs["name"] = "test_table"
  
      db = Database(**kwargs)
      assert db.schema == {0: object}
  
      try:
          assert len(db) == 0
          assert str(db) == f"{Database.__name__}(0)"
      except NotImplementedError:
          assert str(db) == f"{Database.__name__}()"
  
      data = torch.randn(5)
      db.insert(0, data)
      try:
          assert len(db) == 1
      except NotImplementedError:
          pass
      assert torch.equal(db.get(0), data)
  
      indices = torch.tensor([1, 2])
      data_list = torch.randn(2, 5)
      db.multi_insert(indices, data_list, batch_size=batch_size)
      try:
          assert len(db) == 3
      except NotImplementedError:
          pass
      out_list = db.multi_get(indices, batch_size=batch_size)
      assert isinstance(out_list, list)
      assert len(out_list) == 2
      assert torch.equal(out_list[0], data_list[0])
      assert torch.equal(out_list[1], data_list[1])
  
      db.close()
  
file_path: pytorch_geometric/test/data/test_database.py
imports: import math
  import os.path
  import pytest
  import torch
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, RocksDatabase, SQLiteDatabase
  from torch_geometric.data.database import TensorInfo
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import has_package, withPackage
label_desc: Use image node_id 1 for calling a global function with example usage: test_database_single_tensor(tmp_path, Database, batch_size) without return types