
from collections.abc import Sequence

def      A (       A_							:					Optional[Any] = None       ):
						if nums is None or not nums:
												raise ValueError('''Input sequence should not be empty'''       )

						snake_case       :     Dict =    nums[0]
						for i in range(1    ,							len(_SCREAMING_SNAKE_CASE       )       ):
												snake_case       :     Any =    nums[i]
												snake_case       :     Union[str, Any] =    max(_SCREAMING_SNAKE_CASE    ,							ans + num    ,							_SCREAMING_SNAKE_CASE       )

						return ans


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						# Try on a sample input from the user
						UpperCAmelCase    					=   int(input("Enter number of elements : ").strip())
						UpperCAmelCase    					=   list(map(int, input("\nEnter the numbers : ").strip().split()))[:n]
						print(max_subsequence_sum(array))



'''simple docstring'''





import pytest

from datasets import inspect_metric, list_metrics, load_metric

@pytest.fixture
def      A (       A_							:					str       ):
						monkeypatch.setattr('''datasets.utils.deprecation_utils._emitted_deprecation_warnings'''    ,							set()       )

@pytest.fixture
def      A (       A_							:					Optional[Any]       ):

						class 						a   :




										def __init__(							self	:				List[str],    SCREAMING_SNAKE_CASE_	:				Optional[Any]      ):
																snake_case       :     List[str] =    metric_id




						class 						a   :
										_snake_case		    = [MetricMock(__magic_name__    ) for metric_id in ['''accuracy''', '''mse''', '''precision''', '''codeparrot/apps_metric''']]




										def 	__snake_case							(							self	:				str      ):
																return self._metrics




						monkeypatch.setattr('''datasets.inspect.huggingface_hub'''    ,							HfhMock()       )





@pytest.mark.parametrize(
    '''func, args'''    ,							[(load_metric, ('''metrics/mse''',)), (list_metrics, ()), (inspect_metric, ('''metrics/mse''', '''tmp_path'''))]       )
def      A (       A_							:					str    ,							A_							:					Dict    ,							A_							:					int    ,							A_							:					int    ,							A_							:					str       ):
						if "tmp_path" in args:
												snake_case       :     List[str] =    tuple(arg if arg != '''tmp_path''' else tmp_path for arg in args       )
						with pytest.warns(A_    ,							match='''https://huggingface.co/docs/evaluate'''       ):
												func(*A_       )

