code: def get_activation(act, inplace=False):
      """
  
      Parameters
      ----------
      act
          Name of the activation
      inplace
          Whether to perform inplace activation
  
      Returns
      -------
      activation_layer
          The activation
      """
      if act is None:
          return lambda x: x
      if isinstance(act, str):
          if act == "leaky":
              # TODO(sxjscience) Add regex matching here to parse `leaky(0.1)`
              return nn.LeakyReLU(0.1, inplace=inplace)
          elif act == "identity":
              return nn.Identity()
          elif act == "elu":
              return nn.ELU(inplace=inplace)
          elif act == "gelu":
              return nn.GELU()
          elif act == "gelu(tanh)":
              return GELU_TANH()
          elif act == "relu":
              return nn.ReLU()
          elif act == "sigmoid":
              return nn.Sigmoid()
          elif act == "tanh":
              return nn.Tanh()
          elif act == "softrelu" or act == "softplus":
              return nn.Softplus()
          elif act == "softsign":
              return nn.Softsign()
          else:
              raise NotImplementedError(
                  'act="{}" is not supported. '
                  "Try to include it if you can find that in "
                  "https://pytorch.org/docs/stable/nn.html".format(act)
              )
      else:
          return act
  
imports: import math
  from collections import OrderedDict
  import torch
  import numpy
  from torch import nn
  from typing import Union
  from .utils import to_torch_dtype
label_desc: Use image node_id 3 for calling a global function with example usage: get_activation(act, inplace) and returns: function, act, nn, nn, nn, nn, GELU_TANH, nn, nn, nn, nn, nn