code: def test_pickle(tmp_path):
      dataset = OnDiskDataset(tmp_path)
      assert len(dataset) == 0
      assert str(dataset) == "OnDiskDataset(0)"
      assert osp.exists(osp.join(tmp_path, "processed", "sqlite.db"))
  
      data_list = [
          Data(
              x=torch.randn(5, 8),
              edge_index=torch.randint(0, 5, (2, 16)),
              num_nodes=5,
          )
          for _ in range(4)
      ]
  
      dataset.append(data_list[0])
      assert len(dataset) == 1
  
      dataset.extend(data_list[1:])
      assert len(dataset) == 4
  
      out = dataset.get(0)
      assert torch.equal(out.x, data_list[0].x)
      assert torch.equal(out.edge_index, data_list[0].edge_index)
      assert out.num_nodes == data_list[0].num_nodes
  
      out_list = dataset.multi_get([1, 2, 3])
      for out, data in zip(out_list, data_list[1:]):
          assert torch.equal(out.x, data.x)
          assert torch.equal(out.edge_index, data.edge_index)
          assert out.num_nodes == data.num_nodes
  
      dataset.close()
  
      # Test persistence of datasets:
      dataset = OnDiskDataset(tmp_path)
      assert len(dataset) == 4
  
      out = dataset.get(0)
      assert torch.equal(out.x, data_list[0].x)
      assert torch.equal(out.edge_index, data_list[0].edge_index)
      assert out.num_nodes == data_list[0].num_nodes
  
      dataset.close()
  
imports: import os.path
  from typing import Any, Dict
  import torch
  from torch_geometric.data import Data, OnDiskDataset
  from torch_geometric.testing import withPackage
label_desc: Use image node_id 1 for calling a global function with example usage: test_pickle(tmp_path) without return types