




'''simple docstring'''



from collections.abc import Sequence
def 			SCREAMING_SNAKE_CASE_			(							__A    :			List[str]	,					__A    :			Optional[Any] = False  )			->			float:
   if not arr:
      return 0

   _SCREAMING_SNAKE_CASE	=				0 if allow_empty_subarrays else float("-inf"  )
   _SCREAMING_SNAKE_CASE	=				0.0
   for num in arr:
      _SCREAMING_SNAKE_CASE	=				max(0 if allow_empty_subarrays else num	,					curr_sum + num  )
      _SCREAMING_SNAKE_CASE	=				max(__snake_case	,					__snake_case  )

   return max_sum


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

 testmod()

 lowerCamelCase_			=						[-2, 1, -3, 4, -1, 2, 1, -5, 4]
 print(f'''{max_subarray_sum(nums) = }''')







'''simple docstring'''



lowerCamelCase_			=						'Tobias Carryer'

from time import time







class 		lowercase_   :


   """simple docstring"""

   def __init__(   self :     Tuple  ,				__lowerCamelCase :     int  ,				__lowerCamelCase :     List[Any]  ,				__lowerCamelCase :     Optional[int]  ,				__lowerCamelCase :     Dict=int(time()   )   ):  # noqa: B008

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				multiplier
      _SCREAMING_SNAKE_CASE	=				increment
      _SCREAMING_SNAKE_CASE	=				modulo
      _SCREAMING_SNAKE_CASE	=				seed



   def 							lowerCAmelCase_      (   self :     List[str]   ):

      """simple docstring"""
      _SCREAMING_SNAKE_CASE	=				(self.multiplier * self.seed + self.increment) % self.modulo
      return self.seed


if __name__ == "__main__":
 # Show the LCG in action.
 lowerCamelCase_			=						LinearCongruentialGenerator(1_66_45_25, 10_13_90_42_23, 2 << 31)
 while True:
  print(lcg.next_number())

