



'''simple docstring'''


import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


lowercase							       =			logging.getLogger()







@unittest.skip("Temporarily disable the doc tests.")
@require_torch
@require_tf
@slow
class 	UpperCAmelCase	(		unittest.TestCase):


 '''simple docstring'''




 def       lowercase_  (   self							,  lowerCAmelCase_							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = True							,  ) ->      Optional[Any]:



      """simple docstring"""







      a_       		=[file for file in os.listdir(lowerCAmelCase_) if os.path.isfile(os.path.join(lowerCAmelCase_							,  lowerCAmelCase_))]

      if identifier is not None:
           a_       		=[file for file in files if identifier in file]

      if n_identifier is not None:
           if isinstance(lowerCAmelCase_							,  lowerCAmelCase_):
                for n_ in n_identifier:
                     a_       		=[file for file in files if n_ not in file]
           else:
                a_       		=[file for file in files if n_identifier not in file]

      a_       		=ignore_files or []
      ignore_files.append("__init__.py")
      a_       		=[file for file in files if file not in ignore_files]

      for file in files:
           # Open all files
           print("Testing"							,  lowerCAmelCase_)

           if only_modules:
                a_       		=file.split(".")[0]
                try:
                     a_       		=getattr(lowerCAmelCase_							,  lowerCAmelCase_)
                     a_       		=doctest.DocTestSuite(lowerCAmelCase_)
                     a_       		=unittest.TextTestRunner().run(lowerCAmelCase_)
                     self.assertIs(len(result.failures)							,  0)
                except AttributeError:
                     logger.info(f"""{module_identifier} is not a module.""")
           else:
                a_       		=doctest.testfile(str(".." / directory / file)							,  optionflags=doctest.ELLIPSIS)
                self.assertIs(result.failed							,  0)




 def       lowercase_  (   self) ->      str:



      """simple docstring"""







      a_       		=Path("src/transformers")
      a_       		="modeling"
      a_       		=[
          "modeling_ctrl.py",
          "modeling_tf_ctrl.py",
      ]
      self.analyze_directory(lowerCAmelCase_							,  identifier=lowerCAmelCase_							,  ignore_files=lowerCAmelCase_)




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



      """simple docstring"""







      a_       		=Path("src/transformers")
      a_       		="tokenization"
      self.analyze_directory(lowerCAmelCase_							,  identifier=lowerCAmelCase_)




 def       lowercase_  (   self) ->      Tuple:



      """simple docstring"""







      a_       		=Path("src/transformers")
      a_       		="configuration"
      self.analyze_directory(lowerCAmelCase_							,  identifier=lowerCAmelCase_)




 def       lowercase_  (   self) ->      str:



      """simple docstring"""







      a_       		=Path("src/transformers")
      a_       		=["configuration", "modeling", "tokenization"]
      self.analyze_directory(lowerCAmelCase_							,  n_identifier=lowerCAmelCase_)




 def       lowercase_  (   self) ->      Tuple:



      """simple docstring"""







      a_       		=Path("docs/source")
      a_       		=["favicon.ico"]
      self.analyze_directory(lowerCAmelCase_							,  ignore_files=lowerCAmelCase_							,  only_modules=lowerCAmelCase_)







'''simple docstring'''


from collections.abc import Sequence






def  UpperCAmelCase_       (		lowercase__ = None       ):


     '''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(lowercase__       )       ):
          a_       		=nums[i]
          a_       		=max(lowercase__       ,	ans + num       ,	lowercase__       )

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


