class_docstr: This class is used to add vertex degree based node features to graphs.
  This is usually used to preprocess the graph datasets that do not have
  node features.
docstr: This function computes statistics over all nodes in all sample graphs.
  These statistics are maximum, mean, and standard deviation.
  
  Args:
      dataset (:class:`torch.utils.data.Dataset`): The dataset containing
      all sample graphs.
docstr_tok: ["This","function","computes","statistics","over","all","nodes","in","all","sample","graphs",".","These","statistics","are","maximum",",","mean",",","and","standard","deviation",".","Args",":","dataset","(",":","class",":","`","torch.utils.data.Dataset","`",")",":","The","dataset","containing","all","sample","graphs","."]
code: def _statistic(self, dataset):
      r"""
      This function computes statistics over all nodes in all sample graphs.
      These statistics are maximum, mean, and standard deviation.
  
      Args:
          dataset (:class:`torch.utils.data.Dataset`): The dataset containing
          all sample graphs.
      """
      degs = []
      max_degree = 0
      for data in dataset:
          print(type(data))
          degs += [degree(data.edge_index[0], dtype=torch.long)]
          max_degree = max(max_degree, degs[-1].max().item())
  
      self.max_degree = max_degree
      deg = torch.cat(degs, dim=0).to(torch.float)
      self.mean, self.std = deg.mean().item(), deg.std().item()
  
imports: import random
  import torch
  import torch.nn.functional
  from torch.utils.data import Dataset
  from torch_geometric.utils import degree
label_desc: Use image node_id 2 for calling the DegreeTrans obj's underlying member method code with example usage: obj._statistic(dataset) without return types