






"""simple docstring"""
from collections.abc import Sequence


def 							A						(				__snake_case: Sequence[float] ,     __snake_case: bool = False  )    ->		float:

       """simple docstring"""





       if not arr:
              return 0

       __magic_name__      				=    0 if allow_empty_subarrays else float('-inf'  )
       __magic_name__      				=    0.0
       for num in arr:
              __magic_name__      				=    max(0 if allow_empty_subarrays else num ,     curr_sum + num  )
              __magic_name__      				=    max(__snake_case ,     __snake_case  )

       return max_sum


if __name__ == "__main__":
 from doctest import testmod

 testmod()

 snake_case : int     		=		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
 print(f"""{max_subarray_sum(nums) = }""")







"""simple docstring"""
import os
import tempfile
import unittest

from transformers.models.marian.convert_marian_tatoeba_to_pytorch import DEFAULT_REPO, TatoebaConverter
from transformers.testing_utils import slow
from transformers.utils import cached_property



@unittest.skipUnless(os.path.exists(a_)							,	"""Tatoeba directory does not exist.""")
class        UpperCamelCase__ (				unittest.TestCase):







    """simple docstring"""







    @cached_property
    def 				a__			(		self :	int ):





           '''simple docstring'''

           __magic_name__      				=    tempfile.mkdtemp()
           return TatoebaConverter(save_dir=UpperCamelCase_ )







    @slow
    def 				a__			(		self :	List[str] ):





           '''simple docstring'''

           self.resolver.convert_models(['heb-eng'] )







    @slow
    def 				a__			(		self :	Tuple ):





           '''simple docstring'''

           __magic_name__				,  __magic_name__      				=    self.resolver.write_model_card('opus-mt-he-en'				,    dry_run=UpperCamelCase_ )
           assert mmeta["long_pair"] == "heb-eng"