

import unittest

from transformers.testing_utils import CaptureStdout
from transformers.tools.python_interpreter import evaluate
def 						_snake_case(   SCREAMING_SNAKE_CASE__      :     Tuple				)							->				Tuple:





    '''simple docstring'''






    return x + 2


class 			A						(							unittest.TestCase			):







    """simple docstring"""





    def 						snake_case__					(				self			:	List[Any]		)->   List[Any]:





        '''simple docstring'''







        A__   				=       'x = 3'
        A__   				=       {}
        A__   				=       evaluate(a__,{},state=a__		)
        assert result == 3
        self.assertDictEqual(a__,{'x': 3}		)

        A__   				=       'x = y'
        A__   				=       {'y': 5}
        A__   				=       evaluate(a__,{},state=a__		)
        # evaluate returns the value of the last assignment.
        assert result == 5
        self.assertDictEqual(a__,{'x': 5, 'y': 5}		)


    def 						snake_case__					(				self			:	Union[str, Any]		)->   Optional[Any]:





        '''simple docstring'''







        A__   				=       'y = add_two(x)'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{'add_two': add_two},state=a__		)
        assert result == 5
        self.assertDictEqual(a__,{'x': 3, 'y': 5}		)

        # Won't work without the tool
        with CaptureStdout() as out:
            A__   				=       evaluate(a__,{},state=a__		)
        assert result is None
        assert "tried to execute add_two" in out.out


    def 						snake_case__					(				self			:	List[str]		)->   Any:





        '''simple docstring'''







        A__   				=       'x = 3'
        A__   				=       {}
        A__   				=       evaluate(a__,{},state=a__		)
        assert result == 3
        self.assertDictEqual(a__,{'x': 3}		)


    def 						snake_case__					(				self			:	Optional[int]		)->   List[Any]:





        '''simple docstring'''







        A__   				=       'test_dict = {\'x\': x, \'y\': add_two(x)}'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{'add_two': add_two},state=a__		)
        self.assertDictEqual(a__,{'x': 3, 'y': 5}		)
        self.assertDictEqual(a__,{'x': 3, 'test_dict': {'x': 3, 'y': 5}}		)


    def 						snake_case__					(				self			:	List[Any]		)->   str:





        '''simple docstring'''







        A__   				=       'x = 3\ny = 5'
        A__   				=       {}
        A__   				=       evaluate(a__,{},state=a__		)
        # evaluate returns the value of the last assignment.
        assert result == 5
        self.assertDictEqual(a__,{'x': 3, 'y': 5}		)


    def 						snake_case__					(				self			:	Tuple		)->   str:





        '''simple docstring'''







        A__   				=       'text = f\'This is x: {x}.\''
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{},state=a__		)
        # evaluate returns the value of the last assignment.
        assert result == "This is x: 3."
        self.assertDictEqual(a__,{'x': 3, 'text': 'This is x: 3.'}		)


    def 						snake_case__					(				self			:	Union[str, Any]		)->   List[str]:





        '''simple docstring'''







        A__   				=       'if x <= 3:\n    y = 2\nelse:\n    y = 5'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{},state=a__		)
        # evaluate returns the value of the last assignment.
        assert result == 2
        self.assertDictEqual(a__,{'x': 3, 'y': 2}		)

        A__   				=       {'x': 8}
        A__   				=       evaluate(a__,{},state=a__		)
        # evaluate returns the value of the last assignment.
        assert result == 5
        self.assertDictEqual(a__,{'x': 8, 'y': 5}		)


    def 						snake_case__					(				self			:	Tuple		)->   Union[str, Any]:





        '''simple docstring'''







        A__   				=       'test_list = [x, add_two(x)]'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{'add_two': add_two},state=a__		)
        self.assertListEqual(a__,[3, 5]		)
        self.assertDictEqual(a__,{'x': 3, 'test_list': [3, 5]}		)


    def 						snake_case__					(				self			:	str		)->   List[str]:





        '''simple docstring'''







        A__   				=       'y = x'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{},state=a__		)
        assert result == 3
        self.assertDictEqual(a__,{'x': 3, 'y': 3}		)


    def 						snake_case__					(				self			:	Any		)->   Dict:





        '''simple docstring'''







        A__   				=       'test_list = [x, add_two(x)]\ntest_list[1]'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{'add_two': add_two},state=a__		)
        assert result == 5
        self.assertDictEqual(a__,{'x': 3, 'test_list': [3, 5]}		)

        A__   				=       'test_dict = {\'x\': x, \'y\': add_two(x)}\ntest_dict[\'y\']'
        A__   				=       {'x': 3}
        A__   				=       evaluate(a__,{'add_two': add_two},state=a__		)
        assert result == 5
        self.assertDictEqual(a__,{'x': 3, 'test_dict': {'x': 3, 'y': 5}}		)


    def 						snake_case__					(				self			:	Dict		)->   int:





        '''simple docstring'''







        A__   				=       'x = 0\nfor i in range(3):\n    x = i'
        A__   				=       {}
        A__   				=       evaluate(a__,{'range': range},state=a__		)
        assert result == 2
        self.assertDictEqual(a__,{'x': 2, 'i': 2}		)




from collections.abc import Sequence
def 						_snake_case(   SCREAMING_SNAKE_CASE__      :     Sequence[int] | None = None				)							->				int:





    '''simple docstring'''






    if nums is None or not nums:
        raise ValueError('Input sequence should not be empty'				)

    A__   				=       nums[0]
    for i in range(1   ,      len(SCREAMING_SNAKE_CASE__				)				):
        A__   				=       nums[i]
        A__   				=       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
     lowercase_			=  int(input("Enter number of elements : ").strip())
     lowercase_			=  list(map(int, input("\nEnter the numbers : ").strip().split()))[:n]
     print(max_subsequence_sum(array))

