




'''simple docstring'''



def       _UpperCamelCase			(_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     return number | (1 << position)







def       _UpperCamelCase			(_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     return number & ~(1 << position)







def       _UpperCamelCase			(_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     return number ^ (1 << position)







def       _UpperCamelCase			(_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> bool:




     '''simple docstring'''





     return ((number >> position) & 1) == 1







def       _UpperCamelCase			(_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     return int((number & (1 << position)) != 0						)


if __name__ == "__main__":
     import doctest

     doctest.testmod()














"""simple docstring"""
from typing import Dict

from .base import GenericTensor, Pipeline



class   SCREAMING_SNAKE_CASE	(					_SCREAMING_SNAKE_CASE    ):





	"""simple docstring"""




	def  lowerCamelCase(self  ,  lowerCAmelCase_=None  ,  lowerCAmelCase_=None  ,  lowerCAmelCase_=None  ,  **lowerCAmelCase_				):
		if tokenize_kwargs is None:
			A_		:    Dict						     = {}

		if truncation is not None:
			if "truncation" in tokenize_kwargs:
				raise ValueError(
				    """truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)"""				)
			A_		:    Optional[Any]						     = truncation

		A_		:    Optional[int]						     = tokenize_kwargs

		A_		:    Optional[Any]						     = {}
		if return_tensors is not None:
			A_		:    Optional[Any]						     = return_tensors

		return preprocess_params, {}, postprocess_params





	def  lowerCamelCase(self  ,  lowerCAmelCase_  ,  **lowerCAmelCase_				):
		A_		:    List[Any]						     = self.framework
		A_		:    Optional[int]						     = self.tokenizer(lowerCAmelCase_  ,  return_tensors=lowerCAmelCase_  ,  **lowerCAmelCase_				)
		return model_inputs





	def  lowerCamelCase(self  ,  lowerCAmelCase_				):
		A_		:    List[Any]						     = self.model(**lowerCAmelCase_				)
		return model_outputs





	def  lowerCamelCase(self  ,  lowerCAmelCase_  ,  lowerCAmelCase_=False				):
		# [0] is the first available tensor, logits or last_hidden_state.
		if return_tensors:
			return model_outputs[0]
		if self.framework == "pt":
			return model_outputs[0].tolist()
		elif self.framework == "tf":
			return model_outputs[0].numpy().tolist()





	def __call__(self  ,  *lowerCAmelCase_  ,  **lowerCAmelCase_				):
		return super().__call__(*lowerCAmelCase_  ,  **lowerCAmelCase_				)

