code: def get_positive_expectation(p_samples, average=True):
      """Computes the positive part of a JS Divergence.
      Args:
          p_samples: Positive samples.
          average: Average the result over samples.
      Returns:
          th.Tensor
      """
      log_2 = math.log(2.0)
      Ep = log_2 - F.softplus(-p_samples)
  
      if average:
          return Ep.mean()
      else:
          return Ep
  
file_path: dgl/examples/pytorch/mvgrl/graph/utils.py
imports: import math
  import numpy
  import torch
  import torch.nn.functional
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import GridSearchCV, StratifiedKFold
  from sklearn.svm import LinearSVC
label_desc: Use image node_id 2 for calling a global function with example usage: get_positive_expectation(p_samples, average) and returns: Ep, Ep