






from __future__ import annotations

from enum import Enum, unique
from typing import TypeVar

# Create a generic variable that can be 'Enum', or any subclass.
lowerCamelCase_		  =						TypeVar("""T""", bound="""Enum""")




@unique
class 							a_				(		a_	):


							'''simple docstring'''






							__a:			Optional[Any]									=					8_0
							__a:			Any									=					7_0
							__a:			Union[str, Any]									=					6_0
							__a:			Tuple									=					5_0
							__a:			Dict									=					4_0
							__a:			Tuple									=					3_0
							__a:			Any									=					2_0
							__a:			List[str]									=					1_0




@unique
class 							a_				(		a_	):


							'''simple docstring'''






							__a:			Any									=					2_4
							__a:			int									=					2_1
							__a:			Tuple									=					1_8
							__a:			List[str]									=					1_5
							__a:			List[str]									=					1_2
							__a:			Optional[int]									=					9
							__a:			Tuple									=					6
							__a:			List[Any]									=					3
							__a:			int									=					2
							__a:			Optional[Any]									=					1
							__a:			Dict									=					-1
							__a:			Dict									=					-2
							__a:			Union[str, Any]									=					-3
							__a:			List[Any]									=					-6
							__a:			Optional[Any]									=					-9
							__a:			Any									=					-1_2
							__a:			int									=					-1_5
							__a:			str									=					-1_8
							__a:			List[Any]									=					-2_1
							__a:			List[Any]									=					-2_4

							@classmethod
							def   _lowercase (	cls     )      ->      dict:
														'''simple docstring'''

														return {unit.name: unit.value for unit in cls if unit.value > 0}






							@classmethod
							def   _lowercase (	cls     )      ->      dict:
														'''simple docstring'''

														return {unit.name: unit.value for unit in cls if unit.value < 0}


def   lowerCamelCase      (		a_			)			->    str:
							lowerCAmelCase_       		=  SIUnit.get_positive() if value > 0 else SIUnit.get_negative()
							for name_prefix, value_prefix in prefixes.items():
														lowerCAmelCase_       		=  value / (10**value_prefix)
														if numerical_part > 1:
																					return F'''{numerical_part!s} {name_prefix}'''
							return str(a_			)
def   lowerCamelCase      (		a_			)			->    str:
							for prefix in BinaryUnit:
														lowerCAmelCase_       		=  value / (2**prefix.value)
														if numerical_part > 1:
																					return F'''{numerical_part!s} {prefix.name}'''
							return str(a_			)


if __name__ == "__main__":
		import doctest

		doctest.testmod()











import warnings

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




class 							a_				(		a_	):


							'''simple docstring'''






							__a:			int									=					['''image_processor''', '''tokenizer''']
							__a:			int									=					'''VideoMAEImageProcessor'''
							__a:			Dict									=					('''CLIPTokenizer''', '''CLIPTokenizerFast''')

							def __init__(	self    ,    lowercase_=None    ,    lowercase_=None    ,    **lowercase_     )      ->      Optional[Any]:
														'''simple docstring'''

														lowerCAmelCase_       		=  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_    ,    )
																					lowerCAmelCase_       		=  kwargs.pop('feature_extractor'     )

														lowerCAmelCase_       		=  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_     )
														lowerCAmelCase_       		=  self.image_processor

							def __call__(	self    ,    lowercase_=None    ,    lowercase_=None    ,    lowercase_=None    ,    **lowercase_     )      ->      Optional[int]:
														'''simple docstring'''

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

														if text is not None:
																					lowerCAmelCase_       		=  self.tokenizer(lowercase_    ,    return_tensors=lowercase_    ,    **lowercase_     )

														if videos is not None:
																					lowerCAmelCase_       		=  self.image_processor(lowercase_    ,    return_tensors=lowercase_    ,    **lowercase_     )

														if text is not None and videos is not None:
																					lowerCAmelCase_       		=  image_features.pixel_values
																					return encoding
														elif text is not None:
																					return encoding
														else:
																					return BatchEncoding(data=dict(**lowercase_     )    ,    tensor_type=lowercase_     )

							def   _lowercase (	self    ,    *lowercase_    ,    **lowercase_     )      ->      Union[str, Any]:
														'''simple docstring'''

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

							def   _lowercase (	self    ,    *lowercase_    ,    **lowercase_     )      ->      str:
														'''simple docstring'''

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

							@property
							def   _lowercase (	self     )      ->      Any:
														'''simple docstring'''

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

							@property
							def   _lowercase (	self     )      ->      List[str]:
														'''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   _lowercase (	self     )      ->      int:
														'''simple docstring'''

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



