





from __future__ import annotations


def 							__snake_case							(    lowerCAmelCase_ ,							lowerCAmelCase_ ,							lowerCAmelCase_	)				->						int | float:
    if len(lowerCAmelCase_	) == 0:
        raise ValueError('''find_max() arg is an empty sequence'''	)
    if (
        left >= len(lowerCAmelCase_	)
        or left < -len(lowerCAmelCase_	)
        or right >= len(lowerCAmelCase_	)
        or right < -len(lowerCAmelCase_	)
    ):
        raise IndexError('''list index out of range'''	)
    if left == right:
        return nums[left]
    SCREAMING_SNAKE_CASE__											=			(left + right) >> 1  # the middle
    SCREAMING_SNAKE_CASE__											=			find_max(lowerCAmelCase_ ,							lowerCAmelCase_ ,							lowerCAmelCase_	)  # find max in range[left, mid]
    SCREAMING_SNAKE_CASE__											=			find_max(lowerCAmelCase_ ,							mid + 1 ,							lowerCAmelCase_	)  # find max in range[mid + 1, right]

    return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)







from torch import nn


def 							__snake_case							(    lowerCAmelCase_	)				->						Tuple:
    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}'''	)
