



'''simple docstring'''





from collections.abc import Sequence





def 						__snake_case(				_lowerCAmelCase = None		)		-> int:
      if nums is None or not nums:
            raise ValueError("""Input sequence should not be empty"""		)

      snake_case__  :    Union[str, Any]    						=      nums[0]
      for i in range(1     ,   len(_lowerCAmelCase		)		):
            snake_case__  :    List[Any]    						=      nums[i]
            snake_case__  :    List[str]    						=      max(_lowerCAmelCase     ,   ans + num     ,   _lowerCAmelCase		)

      return ans


if __name__ == "__main__":
       import doctest

       doctest.testmod()

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





'''simple docstring'''





import logging
from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional, Union

from .generation.configuration_utils import GenerationConfig
from .training_args import TrainingArguments
from .utils import add_start_docstrings


__a          =		logging.getLogger(__name__)







@dataclass
@add_start_docstrings(TrainingArguments.__doc__	)
class     UpperCAmelCase_       (       _a	):
    """simple docstring"""







    lowercase					=		field(default=_a		,		metadata={"help": "Whether to use SortishSampler or not."}	)
    lowercase					=		field(
        default=_a		,		metadata={"help": "Whether to use generate to calculate generative metrics (ROUGE, BLEU)."}	)
    lowercase					=		field(
        default=_a		,		metadata={
            "help": (
                "The `max_length` to use on each evaluation loop when `predict_with_generate=True`. Will default "
                "to the `max_length` value of the model configuration."
            )
        }		,		)
    lowercase					=		field(
        default=_a		,		metadata={
            "help": (
                "The `num_beams` to use on each evaluation loop when `predict_with_generate=True`. Will default "
                "to the `num_beams` value of the model configuration."
            )
        }		,		)
    lowercase					=		field(
        default=_a		,		metadata={
            "help": "Model id, file path or url pointing to a GenerationConfig json file, to use during prediction."
        }		,		)




    def lowerCamelCase       (    self					:     List[str]						):
          snake_case__  :    int    						=      super().to_dict()
          for k, v in d.items():
                if isinstance(snake_case_ ,     snake_case_						):
                      snake_case__  :    Optional[int]    						=      v.to_dict()
          return d
