class_docstr: A DataSet to lazily load graphs based on queries from TypeDB and some arbitrary id.
code: def __getitem__(self, idx):
      id = self._indices[idx]
      print(f"Fetching graph for id: {id}")
      queries = self.queries_for_id(id)
  
      options = TypeDBOptions.core()
      options.infer = self._infer
  
      with self.session.transaction(
          TransactionType.READ, options=options
      ) as tx:
          # Build a graph from the queries
          graph = build_graph_from_queries(queries, tx)
      graph.name = id
      if self._transform:
          graph = self._transform(graph)
      data = from_networkx(graph)
      data.concepts_by_type = graph.concepts_by_type
      return (
          data,
          self.node_type_indices(graph),
          self.edge_type_indices(graph),
      )
  
file_path: typedb-ml/typedb_ml/pytorch_geometric/dataset/dataset.py
imports: from typing import Sequence, Callable, Optional
  import networkx
  from torch_geometric.utils import from_networkx
  from typedb.client import TypeDBSession, TypeDBOptions, TransactionType
  from typedb_ml.networkx.queries_to_networkx import build_graph_from_queries
label_desc: Use image node_id 3 for calling the DataSet obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: data,  self,  self