class_docstr: An index-based key/value database based on :obj:`sqlite3`.
  
  .. note::
      This database implementation requires the :obj:`sqlite3` package.
  
  Args:
      path (str): The path to where the database should be saved.
      name (str): The name of the table to save the data to.
      schema (Any or Tuple[Any] or Dict[str, Any], optional): The schema of
          the input data.
          Can take :obj:`int`, :obj:`float`, :obj:`str`, :obj:`object`, or a
          dictionary with :obj:`dtype` and :obj:`size` keys (for specifying
          tensor data) as input, and can be nested as a tuple or dictionary.
          Specifying the schema will improve efficiency, since by default the
          database will use python pickling for serializing and
          deserializing. (default: :obj:`object`)
class_docstr_tok: ["An","index-based","key\/value","database","based","on",":","obj",":","`","sqlite3","`",".","..","note",":",":","This","database","implementation","requires","the",":","obj",":","`","sqlite3","`","package",".","Args",":","path","(","str",")",":","The","path","to","where","the","database","should","be","saved",".","name","(","str",")",":","The","name","of","the","table","to","save","the","data","to",".","schema","(","Any","or","Tuple","[","Any","]","or","Dict","[","str",",","Any","]",",","optional",")",":","The","schema","of","the","input","data",".","Can","take",":","obj",":","`","int","`",",",":","obj",":","`","float","`",",",":","obj",":","`","str","`",",",":","obj",":","`","object","`",",","or","a","dictionary","with",":","obj",":","`","dtype","`","and",":","obj",":","`","size","`","keys","(","for","specifying","tensor","data",")","as","input",",","and","can","be","nested","as","a","tuple","or","dictionary",".","Specifying","the","schema","will","improve","efficiency",",","since","by","default","the","database","will","use","python","pickling","for","serializing","and","deserializing",".","(","default",":",":","obj",":","`","object","`",")"]
code: def _deserialize(self, row: Tuple[Any]) -> Any:
      # Deserializes the DB data according to `schema`:
      # * {int, float, str}: Use as they are.
      # * torch.Tensor: Load raw byte string with `dtype` and `size`
      #   information from `schema`
      # * object: Load via pickle
      out_dict = {}
      for i, (key, schema) in enumerate(self.schema.items()):
          value = row[i]
  
          if isinstance(schema, TensorInfo) and schema.is_edge_index:
              meta = torch.frombuffer(
                  value[:32], dtype=torch.long
              ).tolist()
              num_rows = meta[0] if meta[0] >= 0 else None
              num_cols = meta[1] if meta[1] >= 0 else None
              sort_order = INDEX_TO_SORT_ORDER[meta[2]]
              is_undirected = meta[3] > 0
  
              if len(value) > 32:
                  tensor = torch.frombuffer(
                      value[32:], dtype=schema.dtype
                  )
              else:
                  tensor = torch.empty(0, dtype=schema.dtype)
  
              out_dict[key] = EdgeIndex(
                  tensor.view(*schema.size),
                  sparse_size=(num_rows, num_cols),
                  sort_order=sort_order,
                  is_undirected=is_undirected,
              )
  
          elif isinstance(schema, TensorInfo):
              if len(value) > 0:
                  tensor = torch.frombuffer(value, dtype=schema.dtype)
              else:
                  tensor = torch.empty(0, dtype=schema.dtype)
              out_dict[key] = tensor.view(*schema.size)
  
          elif schema == float:
              out_dict[key] = (
                  value if value is not None else float("NaN")
              )
  
          elif schema in {int, str}:
              out_dict[key] = value
  
          else:
              out_dict[key] = pickle.loads(value)
  
      # In case `0` exists as integer in the schema, this means that the
      # schema was passed as either a single entry or a tuple:
      if 0 in self.schema:
          if len(self.schema) == 1:
              return out_dict[0]
          else:
              return tuple(out_dict.values())
      else:  # Otherwise, return the dictionary as it is:
          return out_dict
  
imports: import pickle
  import warnings
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from functools import cached_property
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  from uuid import uuid4
  import torch
  from torch import Tensor
  from tqdm import tqdm
  from torch_geometric import EdgeIndex
  from torch_geometric.edge_index import SortOrder
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 16 for calling the SQLiteDatabase obj's underlying member method code with example usage: obj._deserialize(row) and returns: out_dict, out_dict, tuple