

from collections.abc import Sequence

def 						UpperCamelCase					(lowercase_: Sequence[float]    ,      lowercase_: bool = False					)     ->      float:
	if not arr:
		return 0

	A__							:    Dict        =		0 if allow_empty_subarrays else float("""-inf"""					)
	A__							:    Optional[int]        =		0.0
	for num in arr:
		A__							:    Any        =		max(0 if allow_empty_subarrays else num    ,      curr_sum + num					)
		A__							:    int        =		max(_UpperCAmelCase    ,      _UpperCAmelCase					)

	return max_sum


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

	testmod()

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







'''simple docstring'''







# NOTE: This file is deprecated and will be removed in a future version.
# It only exists so that temporarely `from diffusers.pipelines import DiffusionPipeline` works
from ...utils import deprecate
from ..controlnet.multicontrolnet import MultiControlNetModel  # noqa: F401
from ..controlnet.pipeline_controlnet import StableDiffusionControlNetPipeline  # noqa: F401


deprecate(
    '''stable diffusion controlnet''',
    '''0.22.0''',
    '''Importing `StableDiffusionControlNetPipeline` or `MultiControlNetModel` from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet is deprecated. Please import `from diffusers import StableDiffusionControlNetPipeline` instead.''',
    standard_warn=False,
    stacklevel=3,
)


