


import importlib.metadata
import subprocess
import sys






def 		a__       (							A__ = False							):
			SCREAMING_SNAKE_CASE_						:			Tuple       						= False
			if "IPython" in sys.modules:
						SCREAMING_SNAKE_CASE_						:			str       						= 'google.colab' in str(sys.modules['IPython'].get_ipython()							)

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









import warnings

from ...utils import logging
from .image_processing_vilt import ViltImageProcessor


lowerCAmelCase__       :	int     				=logging.get_logger(__name__)







class      __lowercase  (__SCREAMING_SNAKE_CASE   ):





							"""simple docstring"""







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





										"""simple docstring"""




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





