


import warnings

from ...utils import logging
from .image_processing_layoutlmva import LayoutLMvaImageProcessor


snake_case_  :	Tuple							  =							logging.get_logger(__name__)

class   A__							(						SCREAMING_SNAKE_CASE__     ):




						def __init__(				self    :					Optional[int] ,			*_a    :					List[str] ,			**_a    :					Optional[Any]     )							->   Any:


										"""simple docstring"""





										warnings.warn(
										    '''The class LayoutLMv3FeatureExtractor is deprecated and will be removed in version 5 of Transformers.'''
										    ''' Please use LayoutLMv3ImageProcessor instead.''' ,			snake_case__ ,			)
										super().__init__(*snake_case__ ,			**snake_case__     )







"""simple docstring"""







import importlib.metadata
import subprocess
import sys





def 						lowercase__(A = False						)				->List[str]:




						"""simple docstring"""



						lowercase__				:      Any=       False
						if "IPython" in sys.modules:
												lowercase__				:      Tuple=       "google.colab" in str(sys.modules["IPython"].get_ipython()						)

						if in_colab:
												if upgrade:
																		lowercase__				:      Optional[int]=       ["pip", "install", "-U", "torch"]
																		subprocess.run(A					,		check=A						)
												# get the current version of torch
												lowercase__				:      Tuple=       importlib.metadata.version("torch"						)
												lowercase__				:      Dict=       torch_version[: torch_version.rindex("."						)]
												lowercase__				:      Dict=       f'''https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-{torch_version_trunc}-cp37-cp37m-linux_x86_64.whl'''
												lowercase__				:      Union[str, Any]=       ["pip", "install", xla_wheel]
												subprocess.run(A					,		check=A						)
						else:
												raise RuntimeError("`install_xla` utility works only on google colab."						)






