



'''simple docstring'''





from collections.abc import Sequence





def 						__snake_case(				_lowerCAmelCase     ,   _lowerCAmelCase = False		)		-> float:
      if not arr:
            return 0

      snake_case__  :    Optional[Any]    						=      0 if allow_empty_subarrays else float("""-inf"""		)
      snake_case__  :    List[str]    						=      0.0
      for num in arr:
            snake_case__  :    Any    						=      max(0 if allow_empty_subarrays else num     ,   curr_sum + num		)
            snake_case__  :    Optional[Any]    						=      max(_lowerCAmelCase     ,   _lowerCAmelCase		)

      return max_sum


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

       testmod()

       __a          =		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
       print(F"{max_subarray_sum(nums) = }")


'''simple docstring'''







def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						lowercase_	:     Optional[int]													=       int(__SCREAMING_SNAKE_CASE							)
						if decimal in (0, 1):  # Exit cases for the recursion
												return str(__SCREAMING_SNAKE_CASE							)
						lowercase_						, lowercase_	:     List[str]													=       divmod(__SCREAMING_SNAKE_CASE      ,      2							)
						return binary_recursive(__SCREAMING_SNAKE_CASE							) + str(__SCREAMING_SNAKE_CASE							)
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: str							):



						"""simple docstring"""





						lowercase_	:     str													=       str(__SCREAMING_SNAKE_CASE							).strip()
						if not number:
												raise ValueError('''No input value was provided'''							)
						lowercase_	:     Optional[int]													=       '''-''' if number.startswith('''-'''							) else ''''''
						lowercase_	:     Union[str, Any]													=       number.lstrip('''-'''							)
						if not number.isnumeric():
												raise ValueError('''Input value is not an integer'''							)
						return F'''{negative}0b{binary_recursive(int(__SCREAMING_SNAKE_CASE							)							)}'''


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

							testmod()



