



'''simple docstring'''



import unicodedata
from dataclasses import dataclass
from typing import Optional, Union

import numpy as np

from transformers.data.data_collator import DataCollatorMixin
from transformers.file_utils import PaddingStrategy
from transformers.tokenization_utils_base import PreTrainedTokenizerBase



def   __lowerCAmelCase					(							lowerCamelCase   :						List[Any]				,		lowerCamelCase   :						Any				,		lowerCamelCase   :						List[Any]				,		lowerCamelCase   :						int					):






	'''simple docstring'''




	if isinstance(lowerCAmelCase__				,		lowerCAmelCase__					):
		__lowerCAmelCase												=  np.full((len(lowerCAmelCase__					), sequence_length, 2)				,		lowerCAmelCase__					)
	else:
		__lowerCAmelCase												=  np.full((len(lowerCAmelCase__					), sequence_length)				,		lowerCAmelCase__					)

	for i, tensor in enumerate(lowerCAmelCase__					):
		if padding_side == "right":
			if isinstance(lowerCAmelCase__				,		lowerCAmelCase__					):
				__lowerCAmelCase												=  tensor[:sequence_length]
			else:
				__lowerCAmelCase												=  tensor[:sequence_length]
		else:
			if isinstance(lowerCAmelCase__				,		lowerCAmelCase__					):
				__lowerCAmelCase												=  tensor[:sequence_length]
			else:
				__lowerCAmelCase												=  tensor[:sequence_length]

	return out_tensor.tolist()



def   __lowerCAmelCase					(							lowerCamelCase   :						Optional[Any]					):






	'''simple docstring'''




	__lowerCAmelCase												=  ord(lowerCAmelCase__					)
	if (cp >= 33 and cp <= 47) or (cp >= 58 and cp <= 64) or (cp >= 91 and cp <= 96) or (cp >= 1_23 and cp <= 1_26):
		return True
	__lowerCAmelCase												=  unicodedata.category(lowerCAmelCase__					)
	if cat.startswith("P"					):
		return True
	return False






@dataclass
class 					UpperCAmelCase__	(		__SCREAMING_SNAKE_CASE ):
					a      :     PreTrainedTokenizerBase
					a      :     Union[bool, str, PaddingStrategy]        =							True
					a      :     Optional[int]        =							None
					a      :     Optional[int]        =							None
					a      :     int        =							-1_0_0
					a      :     str        =							"pt"



					def        UpperCAmelCase_						(    self			,				UpperCamelCase     )     ->			Tuple:
						import torch

						__lowerCAmelCase												=  "label" if "label" in features[0].keys() else "labels"
						__lowerCAmelCase												=  [feature[label_name] for feature in features] if label_name in features[0].keys() else None
						__lowerCAmelCase												=  self.tokenizer.pad(
						    _a			,				padding=self.padding			,				max_length=self.max_length			,				pad_to_multiple_of=self.pad_to_multiple_of			,				return_tensors="pt" if labels is None else None			,				)

						if labels is None:
							return batch

						__lowerCAmelCase												=  torch.tensor(batch["entity_ids"]     ).shape[1]
						__lowerCAmelCase												=  self.tokenizer.padding_side
						if padding_side == "right":
							__lowerCAmelCase												=  [
							    list(_a     ) + [self.label_pad_token_id] * (sequence_length - len(_a     )) for label in labels
							]
						else:
							__lowerCAmelCase												=  [
							    [self.label_pad_token_id] * (sequence_length - len(_a     )) + list(_a     ) for label in labels
							]

						__lowerCAmelCase												=  [feature["ner_tags"] for feature in features]
						__lowerCAmelCase												=  padding_tensor(_a			,				-1			,				_a			,				_a     )
						__lowerCAmelCase												=  [feature["original_entity_spans"] for feature in features]
						__lowerCAmelCase												=  padding_tensor(_a			,				(-1, -1)			,				_a			,				_a     )
						__lowerCAmelCase												=  {k: torch.tensor(_a			,				dtype=torch.intaa     ) for k, v in batch.items()}

						return batch




'''simple docstring'''



def   __lowerCAmelCase					(							lowerCamelCase   :						Union[str, Any]					):






	'''simple docstring'''




	__lowerCAmelCase												=  1
	__lowerCAmelCase												=  2
	while i * i <= n:
		__lowerCAmelCase												=  0
		while n % i == 0:
			n //= i
			multiplicity += 1
		n_divisors *= multiplicity + 1
		i += 1
	if n > 1:
		n_divisors *= 2
	return n_divisors



def   __lowerCAmelCase					(							):






	'''simple docstring'''




	__lowerCAmelCase												=  1
	__lowerCAmelCase												=  1

	while True:
		i += 1
		t_num += i

		if count_divisors(lowerCamelCase					) > 5_00:
			break

	return t_num


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