
from typing import Dict

from .base import GenericTensor, Pipeline






class 				SCREAMING_SNAKE_CASE__			(							_lowerCamelCase			):

							"""simple docstring"""






							def 			A__						(     self   ,		SCREAMING_SNAKE_CASE_=None   ,		SCREAMING_SNAKE_CASE_=None   ,		SCREAMING_SNAKE_CASE_=None   ,		**SCREAMING_SNAKE_CASE_	)->      List[Any]:





													'''simple docstring'''






													if tokenize_kwargs is None:
																			__UpperCamelCase        =	{}

													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)'''	)
																			__UpperCamelCase        =	truncation

													__UpperCamelCase        =	tokenize_kwargs

													__UpperCamelCase        =	{}
													if return_tensors is not None:
																			__UpperCamelCase        =	return_tensors

													return preprocess_params, {}, postprocess_params



							def 			A__						(     self   ,		SCREAMING_SNAKE_CASE_   ,		**SCREAMING_SNAKE_CASE_	)->      List[str]:





													'''simple docstring'''






													__UpperCamelCase        =	self.framework
													__UpperCamelCase        =	self.tokenizer(lowercase_   ,		return_tensors=lowercase_   ,		**lowercase_	)
													return model_inputs



							def 			A__						(     self   ,		SCREAMING_SNAKE_CASE_	)->      Tuple:





													'''simple docstring'''






													__UpperCamelCase        =	self.model(**lowercase_	)
													return model_outputs



							def 			A__						(     self   ,		SCREAMING_SNAKE_CASE_   ,		SCREAMING_SNAKE_CASE_=False	)->      Union[str, Any]:





													'''simple docstring'''






													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   ,		*SCREAMING_SNAKE_CASE_   ,		**SCREAMING_SNAKE_CASE_	)->      Any:





													'''simple docstring'''






													return super().__call__(*lowercase_   ,		**lowercase_	)










'''simple docstring'''

import re


def 		__magic_name__    (	__UpperCAmelCase	)		->					bool:

					'''simple docstring'''

					snake_case_									=				re.compile(
					    r'''^(?:0|94|\+94|0{2}94)''' r'''7(0|1|2|4|5|6|7|8)''' r'''(-| |)''' r'''\d{7}$'''	)

					return bool(re.search(__UpperCAmelCase,      __UpperCAmelCase	)	)


if __name__ == "__main__":
							a  :				Any									=  '0094702343221'

							print(is_sri_lankan_phone_number(phone))

