





'''simple docstring'''




from collections.abc import Sequence
def 	UpperCAmelCase_							(					__lowercase							:      Sequence[float]			,     __lowercase							:      bool = False       )		->       float:


     '''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()

  __SCREAMING_SNAKE_CASE     :Optional[int]       =				[-2, 1, -3, 4, -1, 2, 1, -5, 4]
  print(F"{max_subarray_sum(nums) = }")










import warnings

from diffusers import StableDiffusionImgaImgPipeline  # noqa F401


warnings.warn(
    'The `image_to_image.py` script is outdated. Please use directly `from diffusers import'
    ' StableDiffusionImg2ImgPipeline` instead.'
)






