"""simple docstring"""


from collections.abc import Sequence






def     __UpperCAmelCase					(			lowercase   ,lowercase = False		):







  """simple docstring"""
  if not arr:
    return 0

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

  return max_sum


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

    testmod()

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

"""simple docstring"""


from abc import ABC, abstractmethod
from argparse import ArgumentParser


class        a				(		lowerCAmelCase_   ):


    @staticmethod
    @abstractmethod
    def      lowerCAmelCase_  (					__lowerCAmelCase	:  ArgumentParser					):
      raise NotImplementedError()


    @abstractmethod
    def      lowerCAmelCase_  (					self	:  int					):
      raise NotImplementedError()
