code: def sigmoid(tensor, temp=1.0):
      """temperature controlled sigmoid
      takes as input a torch tensor (tensor) and passes it through a sigmoid, controlled by temperature: temp
      """
      exponent = -tensor / temp
      # clamp the input tensor for stability
      exponent = torch.clamp(exponent, min=-50, max=50)
      y = 1.0 / (1.0 + torch.exp(exponent))
      return y
  
file_path: dgl/examples/pytorch/hilander/PSS/Smooth_AP/src/losses.py
imports: import warnings
  import faiss
  import numpy
  import torch
  from scipy import sparse
label_desc: Use image node_id 2 for calling a global function with example usage: sigmoid(tensor, temp) and returns: y