

from collections.abc import Sequence


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__ = False       ):
						if not arr:
												return 0

						snake_case_   =	0 if allow_empty_subarrays else float('''-inf'''       )
						snake_case_   =	0.0
						for num in arr:
												snake_case_   =	max(0 if allow_empty_subarrays else num  ,		curr_sum + num       )
												snake_case_   =	max(SCREAMING_SNAKE_CASE__  ,		SCREAMING_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) = }""")


from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available, is_vision_available
from ...utils import OptionalDependencyNotAvailable


lowerCAmelCase_       	=	{'''configuration_dpt''': ['''DPT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DPTConfig''']}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	['''DPTFeatureExtractor''']
					lowerCAmelCase_       	=	['''DPTImageProcessor''']

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	[
					    '''DPT_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''DPTForDepthEstimation''',
					    '''DPTForSemanticSegmentation''',
					    '''DPTModel''',
					    '''DPTPreTrainedModel''',
					]


if TYPE_CHECKING:
					from .configuration_dpt import DPT_PRETRAINED_CONFIG_ARCHIVE_MAP, DPTConfig

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_dpt import DPTFeatureExtractor
										from .image_processing_dpt import DPTImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_dpt import (
										    DPT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    DPTForDepthEstimation,
										    DPTForSemanticSegmentation,
										    DPTModel,
										    DPTPreTrainedModel,
										)


else:
					import sys

					lowerCAmelCase_       	=	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)