'''simple docstring'''
from torch import nn



def  __lowerCamelCase       (      _UpperCamelCase  :  Optional[int]					):


      '''simple docstring'''


      if act_fn in ["swish", "silu"]:
            return nn.SiLU()
      elif act_fn == "mish":
            return nn.Mish()
      elif act_fn == "gelu":
            return nn.GELU()
      else:
            raise ValueError(F"""Unsupported activation function: {act_fn}"""					)






'''simple docstring'''
def  __lowerCamelCase       (      _UpperCamelCase  :  str							,    _UpperCamelCase  :  list[str]					):


      '''simple docstring'''


      UpperCAmelCase_            =  ''''''
      for word_or_phrase in separated:
            if not isinstance(_UpperCamelCase							,    _UpperCamelCase					):
                  raise Exception('''join() accepts only strings to be joined'''					)
            joined += word_or_phrase + separator
      return joined.strip(_UpperCamelCase					)


if __name__ == "__main__":
      from doctest import testmod

      testmod()





