code: def build_activation(activation: Optional[Activation]):
      if not activation:
          return nn.Identity()
  
      return {
          Activation.ReLU: nn.ReLU,
          Activation.GeLU: nn.GELU,
          Activation.LeakyReLU: nn.LeakyReLU,
          Activation.SquaredReLU: SquaredReLU,
          Activation.StarReLU: StarReLU,
          Activation.SmeLU: SmeLU,
      }[activation]()
  
file_path: xformers/xformers/components/activations.py
imports: from enum import Enum
  from typing import Optional
  import torch
  from torch import nn
label_desc: Use image node_id 1 for calling a global function with example usage: build_activation(activation) and returns: dict, nn