code: def act_layer(act_type, inplace=False, neg_slope=0.2, n_prelu=1):
      # activation layer
      act = act_type.lower()
      if act == "relu":
          layer = nn.ReLU()
      elif act == "leakyrelu":
          layer = nn.LeakyReLU(neg_slope, inplace)
      elif act == "prelu":
          layer = nn.PReLU(num_parameters=n_prelu, init=neg_slope)
      elif act == "swish":
          layer = nn.Swish()
      else:
          raise NotImplementedError(
              "activation layer [%s] is not found" % act
          )
      return layer
  
imports: import numpy
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import paddle.distributed
  import pgl
  import pgl.nn
  from pgl.nn import functional
  from pgl.utils.logger import log
  import models.mol_encoder
label_desc: Use image node_id 4 for calling a global function with example usage: act_layer(act_type, inplace, neg_slope, n_prelu) and returns: layer