class_docstr: Base Class for GNN Benchmark dataset
  
  Reference: https://github.com/shchur/gnn-benchmark#datasets
class_docstr_tok: ["Base","Class","for","GNN","Benchmark","dataset","Reference",":","https",":","\/\/github.com\/shchur\/gnn-benchmark","#","datasets"]
code: def _load_npz(self, file_name):
      with np.load(file_name, allow_pickle=True) as loader:
          loader = dict(loader)
          num_nodes = loader["adj_shape"][0]
          adj_matrix = sp.csr_matrix(
              (
                  loader["adj_data"],
                  loader["adj_indices"],
                  loader["adj_indptr"],
              ),
              shape=loader["adj_shape"],
          ).tocoo()
  
          if "attr_data" in loader:
              # Attributes are stored as a sparse CSR matrix
              attr_matrix = sp.csr_matrix(
                  (
                      loader["attr_data"],
                      loader["attr_indices"],
                      loader["attr_indptr"],
                  ),
                  shape=loader["attr_shape"],
              ).todense()
          elif "attr_matrix" in loader:
              # Attributes are stored as a (dense) np.ndarray
              attr_matrix = loader["attr_matrix"]
          else:
              attr_matrix = None
  
          if "labels_data" in loader:
              # Labels are stored as a CSR matrix
              labels = sp.csr_matrix(
                  (
                      loader["labels_data"],
                      loader["labels_indices"],
                      loader["labels_indptr"],
                  ),
                  shape=loader["labels_shape"],
              ).todense()
          elif "labels" in loader:
              # Labels are stored as a numpy array
              labels = loader["labels"]
          else:
              labels = None
      g = dgl_graph((adj_matrix.row, adj_matrix.col))
      g = transforms.to_bidirected(g)
      g.ndata["feat"] = F.tensor(
          attr_matrix, F.data_type_dict["float32"]
      )
      g.ndata["label"] = F.tensor(labels, F.data_type_dict["int64"])
      return g
  
imports: import os
  import numpy
  import scipy.sparse
  from ..None import backend, transforms
  from ..convert import graph
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import _get_dgl_url, deprecate_class, deprecate_property, load_graphs, save_graphs
label_desc: Use image node_id 7 for calling the GNNBenchmarkDataset obj's underlying member method code with example usage: obj._load_npz(file_name) and returns: g