


def       __lowercase						(    _UpperCamelCase  )     ->Union[str, Any]:







      """simple docstring"""

      if not numbers:
            return 0

      if not isinstance(_UpperCamelCase,     (list, tuple)  ) or not all(
          isinstance(_UpperCamelCase,     _UpperCamelCase  ) for number in numbers  ):
            raise ValueError('''numbers must be an iterable of integers'''  )

      lowercase      : Tuple        =		numbers[0]

      for i in range(1,     len(_UpperCamelCase  )  ):
            # update the maximum and minimum subarray products
            lowercase      : Tuple        =		numbers[i]
            if number < 0:
                  lowercase ,      lowercase      : int        =		min_till_now, max_till_now
            lowercase      : Dict        =		max(_UpperCamelCase,     max_till_now * number  )
            lowercase      : str        =		min(_UpperCamelCase,     min_till_now * number  )

            # update the maximum product found till now
            lowercase      : str        =		max(_UpperCamelCase,     _UpperCamelCase  )

      return max_prod







'''simple docstring'''


import pytest

from datasets.splits import SplitDict, SplitInfo
from datasets.utils.py_utils import asdict
@pytest.mark.parametrize(
    '''split_dict'''					,		[
        SplitDict(),
        SplitDict({'''train''': SplitInfo(name='''train'''					,		num_bytes=1337					,		num_examples=42					,		dataset_name='''my_dataset''' )} ),
        SplitDict({'''train''': SplitInfo(name='''train'''					,		num_bytes=1337					,		num_examples=42 )} ),
        SplitDict({'''train''': SplitInfo()} ),
    ]					,		)
def 						snake_case_       (UpperCamelCase			:    SplitDict ):





							'''simple docstring'''


							_a      	=							split_dict._to_yaml_list()
							assert len(UpperCamelCase ) == len(UpperCamelCase )
							_a      	=							SplitDict._from_yaml_list(UpperCamelCase )
							for split_name, split_info in split_dict.items():
														# dataset_name field is deprecated, and is therefore not part of the YAML dump
														_a      	=							None
														# the split name of split_dict takes over the name of the split info object
														_a      	=							split_name
							assert split_dict == reloaded

@pytest.mark.parametrize(
    '''split_info'''					,		[SplitInfo(), SplitInfo(dataset_name=UpperCamelCase ), SplitInfo(dataset_name='''my_dataset''' )] )
def 						snake_case_       (UpperCamelCase			:    List[str] ):





							'''simple docstring'''


							_a      	=							asdict(SplitDict({'''train''': split_info} ) )
							assert "dataset_name" in split_dict_asdict["train"]
							assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name

