import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin



class   snake_case_       (		unittest.TestCase  ,__A       ):






   def       __UpperCamelCase     (      self				:     Tuple  )					->						Dict:
       lowercase__ :   Optional[Any]    					=				load_tool("text-classification"  )
       self.tool.setup()
       lowercase__ :   Tuple    					=				load_tool("text-classification"	,						remote=lowercase_  )






   def       __UpperCamelCase     (      self				:     List[Any]  )					->						str:
       lowercase__ :   Optional[int]    					=				self.tool("That's quite cool"	,						["positive", "negative"]  )
       self.assertEqual(lowercase_	,						"positive"  )






   def       __UpperCamelCase     (      self				:     Optional[int]  )					->						int:
       lowercase__ :   Tuple    					=				self.remote_tool("That's quite cool"	,						["positive", "negative"]  )
       self.assertEqual(lowercase_	,						"positive"  )






   def       __UpperCamelCase     (      self				:     Optional[int]  )					->						Tuple:
       lowercase__ :   Union[str, Any]    					=				self.tool(text="That's quite cool"	,						labels=["positive", "negative"]  )
       self.assertEqual(lowercase_	,						"positive"  )







   def       __UpperCamelCase     (      self				:     List[Any]  )					->						Union[str, Any]:
       lowercase__ :   List[Any]    					=				self.remote_tool(text="That's quite cool"	,						labels=["positive", "negative"]  )
       self.assertEqual(lowercase_	,						"positive"  )









"""simple docstring"""






def      _snake_case			(				lowercase__		):
				if not isinstance(lowercase__							,    lowercase__		):
								raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
				if len(lowercase__		) == 0:
								raise ValueError('Input list must be a non empty list'		)
				if len(lowercase__		) == 1:
								return True
				_lowerCamelCase     :			List[Any]    =    series[1] - series[0]
				for index in range(len(lowercase__		) - 1		):
								if series[index + 1] - series[index] != common_diff:
												return False
				return True







def      _snake_case			(				lowercase__		):
				if not isinstance(lowercase__							,    lowercase__		):
								raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
				if len(lowercase__		) == 0:
								raise ValueError('Input list must be a non empty list'		)
				_lowerCamelCase     :			Optional[int]    =    0
				for val in series:
								answer += val
				return answer / len(lowercase__		)


if __name__ == "__main__":
			import doctest

			doctest.testmod()