code: def get_activation(act):
      """Get the activation based on the act string
  
      Parameters
      ----------
      act: str or callable function
  
      Returns
      -------
      ret: callable function
      """
      if act is None:
          return lambda x: x
      if isinstance(act, str):
          if act == "leaky":
              return nn.LeakyReLU(0.1)
          elif act == "relu":
              return nn.ReLU()
          elif act == "tanh":
              return nn.Tanh()
          elif act == "sigmoid":
              return nn.Sigmoid()
          elif act == "softsign":
              return nn.Softsign()
          else:
              raise NotImplementedError
      else:
          return act
  
file_path: dgl/examples/pytorch/gcmc/utils.py
imports: import csv
  import re
  from collections import OrderedDict
  import numpy
  import torch
  import torch.nn
  import torch.optim
label_desc: Use image node_id 3 for calling a global function with example usage: get_activation(act) and returns: function, act, nn, nn, nn, nn, nn