



'''simple docstring'''




from typing import List

import numpy as np



def      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			A_     :						Optional[Any]     =					{key: len(lowerCamelCase__   ) for key, value in gen_kwargs.items() if isinstance(lowerCamelCase__						,				lowerCamelCase__   )}
			if len(set(lists_lengths.values()   )   ) > 1:
						raise RuntimeError(
						    (
						        """Sharding is ambiguous for this dataset: """
						        + """we found several data sources lists of different lengths, and we don't know over which list we should parallelize:\n"""
						        + """\n""".join(f'\t- key {key} has length {length}' for key, length in lists_lengths.items()   )
						        + """\nTo fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, """
						        + """and use tuples otherwise. In the end there should only be one single list, or several lists with the same length."""
						    )   )
			A_     :						Optional[Any]     =					max(lists_lengths.values()						,				default=0   )
			return max(1						,				lowerCamelCase__   )



def      a      (			lowerCamelCase__						,				lowerCamelCase__   ):
			'''simple docstring'''





			A_     :						Any     =					[]
			for group_idx in range(lowerCamelCase__   ):
						A_     :						Optional[int]     =					num_shards // max_num_jobs + (group_idx < (num_shards % max_num_jobs))
						if num_shards_to_add == 0:
									break
						A_     :						int     =					shards_indices_per_group[-1].stop if shards_indices_per_group else 0
						A_     :						List[Any]     =					range(lowerCamelCase__						,				start + num_shards_to_add   )
						shards_indices_per_group.append(lowerCamelCase__   )
			return shards_indices_per_group



def      a      (			lowerCamelCase__						,				lowerCamelCase__   ):
			'''simple docstring'''





			A_     :						Optional[int]     =					_number_of_shards_in_gen_kwargs(lowerCamelCase__   )
			if num_shards == 1:
						return [dict(lowerCamelCase__   )]
			else:
						A_     :						str     =					_distribute_shards(num_shards=lowerCamelCase__						,				max_num_jobs=lowerCamelCase__   )
						return [
						    {
						        key: [value[shard_idx] for shard_idx in shard_indices_per_group[group_idx]]
						        if isinstance(lowerCamelCase__						,				lowerCamelCase__   )
						        else value
						        for key, value in gen_kwargs.items()
						    }
						    for group_idx in range(len(lowerCamelCase__   )   )
						]



def      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			return {
			    key: [value for gen_kwargs in gen_kwargs_list for value in gen_kwargs[key]]
			    if isinstance(gen_kwargs_list[0][key]						,				lowerCamelCase__   )
			    else gen_kwargs_list[0][key]
			    for key in gen_kwargs_list[0]
			}



def      a      (			lowerCamelCase__						,				lowerCamelCase__   ):
			'''simple docstring'''





			A_     :						int     =					{len(lowerCamelCase__   ) for value in gen_kwargs.values() if isinstance(lowerCamelCase__						,				lowerCamelCase__   )}
			A_     :						str     =					{}
			for size in list_sizes:
						A_     :						Any     =					list(range(lowerCamelCase__   )   )
						rng.shuffle(indices_per_size[size]   )
			# Now let's copy the gen_kwargs and shuffle the lists based on their sizes
			A_     :						str     =					dict(lowerCamelCase__   )
			for key, value in shuffled_kwargs.items():
						if isinstance(lowerCamelCase__						,				lowerCamelCase__   ):
									A_     :						int     =					[value[i] for i in indices_per_size[len(lowerCamelCase__   )]]
			return shuffled_kwargs




'''simple docstring'''




def      a      (			):
			'''simple docstring'''





			A_     :						Optional[int]     =					[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

			A_     :						Dict     =					6
			A_     :						List[Any]     =					1
			A_     :						Optional[Any]     =					19_01

			A_     :						Tuple     =					0

			while year < 20_01:
						day += 7

						if (year % 4 == 0 and year % 1_00 != 0) or (year % 4_00 == 0):
									if day > days_per_month[month - 1] and month != 2:
												month += 1
												A_     :						Optional[Any]     =					day - days_per_month[month - 2]
									elif day > 29 and month == 2:
												month += 1
												A_     :						str     =					day - 29
						else:
									if day > days_per_month[month - 1]:
												month += 1
												A_     :						List[str]     =					day - days_per_month[month - 2]

						if month > 12:
									year += 1
									A_     :						Tuple     =					1

						if year < 20_01 and day == 1:
									sundays += 1
			return sundays


if __name__ == "__main__":
						print(solution())