code: def select_activation_function(activation):
      if isinstance(activation, str):
          if activation.lower() == "relu":
              return nn.ReLU
          elif activation.lower() == "softplus":
              return nn.Softplus
          else:
              raise ValueError(f"Unknown activation type {activation}")
      elif isinstance(activation, nn.Module):
          return activation
      else:
          raise ValueError(f"Unknown activation type {activation}")
  
imports: import math
  import torch
  import numbers
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: select_activation_function(activation) and returns: nn, activation, nn