

import jax.numpy as jnp

from ...utils import logging
from ..ta.modeling_flax_ta import FlaxTaEncoderModel, FlaxTaForConditionalGeneration, FlaxTaModel
from .configuration_mta import MTaConfig


a_     :    Optional[int]     		=   logging.get_logger(__name__)

a_     :    List[str]     		=   "T5Config"


def 							__lowerCAmelCase     (							_UpperCamelCase		:	jnp.array		,				_UpperCamelCase		:	int		,				_UpperCamelCase		:	int						)		->				jnp.ndarray:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      jnp.zeros_like(_UpperCamelCase						)
 SCREAMING_SNAKE_CASE		    =      shifted_input_ids.at[:, 1:].set(input_ids[:, :-1]						)
 SCREAMING_SNAKE_CASE		    =      shifted_input_ids.at[:, 0].set(_UpperCamelCase						)

 SCREAMING_SNAKE_CASE		    =      jnp.where(shifted_input_ids == -1_00		,				_UpperCamelCase		,				_UpperCamelCase						)
 return shifted_input_ids




class   UpperCamelCase			(  SCREAMING_SNAKE_CASE ):
    __UpperCamelCase    ="mt5"
    __UpperCamelCase    =MTaConfig




class   UpperCamelCase			(  SCREAMING_SNAKE_CASE ):
    __UpperCamelCase    ="mt5"
    __UpperCamelCase    =MTaConfig




class   UpperCamelCase			(  SCREAMING_SNAKE_CASE ):
    __UpperCamelCase    ="mt5"
    __UpperCamelCase    =MTaConfig




from collections.abc import Sequence


def 							__lowerCAmelCase     (							_UpperCamelCase		:	Sequence[int] | None = None						)		->				int:
 '''simple docstring'''


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

 SCREAMING_SNAKE_CASE		    =      nums[0]
 for i in range(1		,				len(_UpperCamelCase						)						):
  SCREAMING_SNAKE_CASE		    =      nums[i]
  SCREAMING_SNAKE_CASE		    =      max(_UpperCamelCase		,				ans + num		,				_UpperCamelCase						)

 return ans


if __name__ == "__main__":
      import doctest

      doctest.testmod()

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

