




import re

def lowercase    (  SCREAMING_SNAKE_CASE )			->							bool:


			'''simple docstring'''







			SCREAMING_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(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE ) )


if __name__ == "__main__":
				SCREAMING_SNAKE_CASE__     :     List[str]		    =       "0094702343221"

				print(is_sri_lankan_phone_number(phone))






from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
				import accelerate

def lowercase    (  SCREAMING_SNAKE_CASE )			->							Union[str, Any]:


			'''simple docstring'''







			if not is_accelerate_available():
						return method
			SCREAMING_SNAKE_CASE_								=						version.parse(accelerate.__version__ ).base_version
			if version.parse(SCREAMING_SNAKE_CASE ) < version.parse('0.17.0' ):
						return method

			def wrapper(self       ,    *SCREAMING_SNAKE_CASE       ,    **SCREAMING_SNAKE_CASE ):
						if hasattr(self       ,    '_hf_hook' ) and hasattr(self._hf_hook       ,    'pre_forward' ):
									self._hf_hook.pre_forward(self )
						return method(self       ,    *SCREAMING_SNAKE_CASE       ,    **SCREAMING_SNAKE_CASE )

			return wrapper
