

"""simple docstring"""






import warnings

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







class       snake_case__  ( lowerCAmelCase_     ):
			SCREAMING_SNAKE_CASE__     				=						['''image_processor''', '''tokenizer''']
			SCREAMING_SNAKE_CASE__     				=						'''ViTImageProcessor'''
			SCREAMING_SNAKE_CASE__     				=						('''CLIPTokenizer''', '''CLIPTokenizerFast''')







			def __init__(			self			: List[Any]			,  lowercase			: Any=None			,  lowercase			: Union[str, Any]=None			,  **lowercase			: Dict  ):





								'''simple docstring'''



								UpperCAmelCase			:   str      =				None
								if "feature_extractor" in kwargs:
													warnings.warn(
													    "The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"
													    " instead."			,  lowercase			,  )
													UpperCAmelCase			:   Any      =				kwargs.pop("feature_extractor"  )

								UpperCAmelCase			:   Any      =				image_processor if image_processor is not None else feature_extractor
								if image_processor is None:
													raise ValueError("You need to specify an `image_processor`."  )
								if tokenizer is None:
													raise ValueError("You need to specify a `tokenizer`."  )

								super().__init__(lowercase			,  lowercase  )







			def __call__(			self			: List[str]			,  lowercase			: Optional[Any]=None			,  lowercase			: Tuple=None			,  lowercase			: List[str]=None			,  lowercase			: str=None			,  **lowercase			: Dict  ):





								'''simple docstring'''



								if text is None and visual_prompt is None and images is None:
													raise ValueError("You have to specify either text, visual prompt or images."  )

								if text is not None and visual_prompt is not None:
													raise ValueError("You have to specify exactly one type of prompt. Either text or visual prompt."  )

								if text is not None:
													UpperCAmelCase			:   Union[str, Any]      =				self.tokenizer(lowercase			,  return_tensors=lowercase			,  **lowercase  )

								if visual_prompt is not None:
													UpperCAmelCase			:   str      =				self.image_processor(lowercase			,  return_tensors=lowercase			,  **lowercase  )

								if images is not None:
													UpperCAmelCase			:   Optional[int]      =				self.image_processor(lowercase			,  return_tensors=lowercase			,  **lowercase  )

								if visual_prompt is not None and images is not None:
													UpperCAmelCase			:   Optional[int]      =				{
													    "pixel_values": image_features.pixel_values,
													    "conditional_pixel_values": prompt_features.pixel_values,
													}
													return encoding
								elif text is not None and images is not None:
													UpperCAmelCase			:   int      =				image_features.pixel_values
													return encoding
								elif text is not None:
													return encoding
								elif visual_prompt is not None:
													UpperCAmelCase			:   Any      =				{
													    "conditional_pixel_values": prompt_features.pixel_values,
													}
													return encoding
								else:
													return BatchEncoding(data=dict(**lowercase  )			,  tensor_type=lowercase  )







			def 			__lowerCAmelCase				(			self			: List[str]			,  *lowercase			: Tuple			,  **lowercase			: Union[str, Any]  ):





								'''simple docstring'''



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







			def 			__lowerCAmelCase				(			self			: str			,  *lowercase			: Dict			,  **lowercase			: List[Any]  ):





								'''simple docstring'''



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







			@property
			def 			__lowerCAmelCase				(			self			: int  ):





								'''simple docstring'''



								warnings.warn(
								    "`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."			,  lowercase			,  )
								return self.image_processor_class







			@property
			def 			__lowerCAmelCase				(			self			: Optional[int]  ):





								'''simple docstring'''



								warnings.warn(
								    "`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."			,  lowercase			,  )
								return self.image_processor









"""simple docstring"""






def   lowercase_	(    _lowercase       :		int							,      _lowercase       :		int	):




					'''simple docstring'''






					return int(input_a == input_a == 0	)



def   lowercase_	(    ):




					'''simple docstring'''






					print("Truth Table of NOR Gate:"	)
					print("|   Input 1   |  Input 2  | Output |"	)
					print(F"""|      0      |    0      |  {nor_gate(0							,      0	)}     |"""	)
					print(F"""|      0      |    1      |  {nor_gate(0							,      1	)}     |"""	)
					print(F"""|      1      |    0      |  {nor_gate(1							,      0	)}     |"""	)
					print(F"""|      1      |    1      |  {nor_gate(1							,      1	)}     |"""	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()


