__UpperCamelCase		:       List[str]									=     [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
__UpperCamelCase		:       List[str]									=     [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
__UpperCamelCase		:       List[Any]									=     {
    0: 'Sunday',
    1: 'Monday',
    2: 'Tuesday',
    3: 'Wednesday',
    4: 'Thursday',
    5: 'Friday',
    6: 'Saturday',
}
def       A	(    _lowercase		,  _lowercase		,  _lowercase						):
						assert len(str(_lowercase						)						) > 2, "year should be in YYYY format"
						assert 1 <= month <= 12, "month should be between 1 to 12"
						assert 1 <= day <= 31, "day should be between 1 to 31"

						# Doomsday algorithm:
						SCREAMING_SNAKE_CASE							:    Dict							=							year // 100
						SCREAMING_SNAKE_CASE							:    List[Any]							=							(5 * (century % 4) + 2) % 7
						SCREAMING_SNAKE_CASE							:    Optional[int]							=							year % 100
						SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							centurian % 12
						SCREAMING_SNAKE_CASE							:    Tuple							=							(
						    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
						) % 7
						SCREAMING_SNAKE_CASE							:    List[str]							=							(
						    DOOMSDAY_NOT_LEAP[month - 1]
						    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
						    else DOOMSDAY_LEAP[month - 1]
						)
						SCREAMING_SNAKE_CASE							:    List[str]							=							(dooms_day + day - day_anchor) % 7
						return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
					import doctest

					doctest.testmod()






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=1_337		,  num_examples=42		,  dataset_name='''my_dataset'''						)}						),
        SplitDict({'''train''': SplitInfo(name='''train'''		,  num_bytes=1_337		,  num_examples=42						)}						),
        SplitDict({'''train''': SplitInfo()}						),
    ]		,  )
def       A	(    _lowercase						):
						SCREAMING_SNAKE_CASE							:    Tuple							=							split_dict._to_yaml_list()
						assert len(_lowercase						) == len(_lowercase						)
						SCREAMING_SNAKE_CASE							:    Tuple							=							SplitDict._from_yaml_list(_lowercase						)
						for split_name, split_info in split_dict.items():
												# dataset_name field is deprecated, and is therefore not part of the YAML dump
												SCREAMING_SNAKE_CASE							:    Any							=							None
												# the split name of split_dict takes over the name of the split info object
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							split_name
						assert split_dict == reloaded



@pytest.mark.parametrize(
    '''split_info'''		,  [SplitInfo(), SplitInfo(dataset_name=_lowercase						), SplitInfo(dataset_name='''my_dataset'''						)]						)
def       A	(    _lowercase						):
						# For backward compatibility, we need asdict(split_dict) to return split info dictrionaries with the "dataset_name"
						# field even if it's deprecated. This way old versionso of `datasets` can still reload dataset_infos.json files
						SCREAMING_SNAKE_CASE							:    List[Any]							=							asdict(SplitDict({'''train''': split_info}						)						)
						assert "dataset_name" in split_dict_asdict["train"]
						assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name





