



'''simple docstring'''




from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class 						_UpperCamelCase  (							lowerCamelCase__    ):


			'''simple docstring'''

			_A      :		List[str]			    =		['''image_processor''', '''tokenizer''']
			_A      :		Tuple			    =		'''AutoImageProcessor'''
			_A      :		str			    =		'''AutoTokenizer'''

			def __init__(							self     : str							,     lowerCAmelCase__     : List[Any]							,     lowerCAmelCase__     : Tuple						):





					"""simple docstring"""






					super().__init__(lowerCAmelCase__							,     lowerCAmelCase__						)
					__SCREAMING_SNAKE_CASE       :		List[str]           =		self.image_processor

			def __call__(							self     : Dict							,     lowerCAmelCase__     : Any=None							,     lowerCAmelCase__     : Dict=None							,     lowerCAmelCase__     : Dict=None							,     **lowerCAmelCase__     : str						):





					"""simple docstring"""






					if text is None and images is None:
							raise ValueError("""You have to specify either text or images. Both cannot be none."""						)

					if text is not None:
							__SCREAMING_SNAKE_CASE       :		int           =		self.tokenizer(lowerCAmelCase__							,     return_tensors=lowerCAmelCase__							,     **lowerCAmelCase__						)

					if images is not None:
							__SCREAMING_SNAKE_CASE       :		Tuple           =		self.image_processor(lowerCAmelCase__							,     return_tensors=lowerCAmelCase__							,     **lowerCAmelCase__						)

					if text is not None and images is not None:
							__SCREAMING_SNAKE_CASE       :		Dict           =		image_features.pixel_values
							return encoding
					elif text is not None:
							return encoding
					else:
							return BatchEncoding(data=dict(**lowerCAmelCase__						)							,     tensor_type=lowerCAmelCase__						)

			def UpperCamelCase__					(							self     : int							,     *lowerCAmelCase__     : List[str]							,     **lowerCAmelCase__     : Any						):





					"""simple docstring"""






					return self.tokenizer.batch_decode(*lowerCAmelCase__							,     **lowerCAmelCase__						)

			def UpperCamelCase__					(							self     : List[str]							,     *lowerCAmelCase__     : int							,     **lowerCAmelCase__     : int						):





					"""simple docstring"""






					return self.tokenizer.decode(*lowerCAmelCase__							,     **lowerCAmelCase__						)



			@property
			def UpperCamelCase__					(							self     : Optional[Any]						):





					"""simple docstring"""






					return ["input_ids", "attention_mask", "pixel_values"]




'''simple docstring'''




def 				lowerCAmelCase_   (	_lowerCamelCase:   int					):
		__SCREAMING_SNAKE_CASE       :		str           =		int(_lowerCamelCase					)
		if n_element < 1:
				__SCREAMING_SNAKE_CASE       :		List[str]           =		ValueError("""a should be a positive number"""					)
				raise my_error

		__SCREAMING_SNAKE_CASE       :		List[Any]           =		[1]
		__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       :		Optional[int]           =		(0, 0, 0)
		__SCREAMING_SNAKE_CASE       :		List[str]           =		1
		while index < n_element:
				while hamming_list[i] * 2 <= hamming_list[-1]:
						i += 1
				while hamming_list[j] * 3 <= hamming_list[-1]:
						j += 1
				while hamming_list[k] * 5 <= hamming_list[-1]:
						k += 1
				hamming_list.append(
				    min(hamming_list[i] * 2       ,      hamming_list[j] * 3       ,      hamming_list[k] * 5					)					)
				index += 1
		return hamming_list


if __name__ == "__main__":
						UpperCamelCase__       :	Optional[Any]    = input('''Enter the last number (nth term) of the Hamming Number Series: ''')
						print('''Formula of Hamming Number Series => 2^i * 3^j * 5^k''')
						UpperCamelCase__       :	List[str]    = hamming(int(n))
						print('''-----------------------------------------------------''')
						print(f"The list with nth numbers is: {hamming_numbers}")
						print('''-----------------------------------------------------''')