
'''simple docstring'''
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate







@dataclass(frozen=_SCREAMING_SNAKE_CASE			)
class  __A				( _SCREAMING_SNAKE_CASE			):
 # `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
 lowerCamelCase				       =field(default='''summarization'''    ,						metadata={'''include_in_asdict_even_if_is_default''': True}			)
 lowerCamelCase				       =Features({'''text''': Value('''string'''			)}			)
 lowerCamelCase				       =Features({'''summary''': Value('''string'''			)}			)
 lowerCamelCase				       ='''text'''
 lowerCamelCase				       ='''summary'''
 @property
 def 		lowercase_(   self			:    List[Any]       ):



   """simple docstring"""





   return {self.text_column: "text", self.summary_column: "summary"}





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







def        A_     (						__SCREAMING_SNAKE_CASE						:  Sequence[float]			,     __SCREAMING_SNAKE_CASE						:  bool = False )				->       float:





  """simple docstring"""

  if not arr:
    return 0

  __A		:     Any												=		0 if allow_empty_subarrays else float("""-inf""" )
  __A		:     List[Any]												=		0.0
  for num in arr:
    __A		:     Tuple												=		max(0 if allow_empty_subarrays else num			,     curr_sum + num )
    __A		:     Optional[int]												=		max(__SCREAMING_SNAKE_CASE			,     __SCREAMING_SNAKE_CASE )

  return max_sum


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

     testmod()

     A__   :		Any 		=[-2, 1, -3, 4, -1, 2, 1, -5, 4]
     print(F"{max_subarray_sum(nums) = }")



