class_docstr: Proabilistic edge perturbation on the given graph or batched graphs. Perturbations are adaptive i.e. critical edges have lower probability of being removed.
  Adaptations based on the paper `Graph Contrastive Learning with Adaptive Augmentation <https://arxiv.org/abs/2010.14945>`
  Refer to `source implementation <https://github.com/CRIPAC-DIG/GCA>` for more details.
  Class objects callable via method :meth:`views_fn`.
  
  Args:
      centrality_measure (str): Method for computing edge centrality. Set `degree` for degree centrality,
      `pr` for PageRank centrality and `evc` for eigen-vector centrality
      prob (float): Probability factor used for calculating edge-drop probability
      threshold (float): Upper-bound probability for dropping any edge, defaults to 0.7
code: def _get_edge_weights(self, data):
      # Add self loops if the degree returns for only a subset of nodes
      if degree(data.edge_index[1]).size(0) != data.x.size(0):
          edge_index_ = add_remaining_self_loops(
              data.edge_index, num_nodes=data.x.size(0)
          )[0]
      else:
          edge_index_ = data.edge_index
      if self.centrality_measure == "degree":
          drop_weights = degree_drop_weights(edge_index_)
      elif self.centrality_measure == "pr":
          drop_weights = pr_drop_weights(
              edge_index_, aggr="sink", k=200
          )
      elif self.centrality_measure == "evc":
          drop_weights = evc_drop_weights(data)
      return drop_weights
  
imports: import torch
  from torch_geometric.utils import to_dense_adj, dense_to_sparse, dropout_adj, degree, add_remaining_self_loops
  from sklearn.preprocessing import MinMaxScaler
  from torch_geometric.data import Batch, Data
  from dig.sslgraph.utils.adaptive import degree_drop_weights, pr_drop_weights, evc_drop_weights, drop_edge_weighted
label_desc: Use image node_id 4 for calling the AdaEdgePerturbation obj's underlying member method code with example usage: obj._get_edge_weights(data) and returns: drop_weights