



"""simple docstring"""






import importlib.metadata
import subprocess
import sys






def 	snake_case__  (						__lowerCamelCase							:       bool = False      ):
			"""simple docstring"""
			lowerCamelCase__						:						Union[str, Any]						      =False
			if "IPython" in sys.modules:
						lowerCamelCase__						:						Dict						      ='''google.colab''' in str(sys.modules['''IPython'''].get_ipython()      )

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










"""simple docstring"""
import warnings

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


_SCREAMING_SNAKE_CASE						 =     logging.get_logger(__name__)







class  _SCREAMING_SNAKE_CASE       (     SCREAMING_SNAKE_CASE__				):



 '''simple docstring'''





 def __init__(self					,     *lowerCAmelCase__					,     **lowerCAmelCase__   ):

  '''simple docstring'''







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



