'''simple docstring'''

import importlib.metadata
import subprocess
import sys



def  _lowerCAmelCase				(				__a = False      )  ->      str:
     '''simple docstring'''







     _UpperCamelCase  :List[str]       =False
     if "IPython" in sys.modules:
          _UpperCamelCase  :Optional[Any]       ="""google.colab""" in str(sys.modules["""IPython"""].get_ipython()      )

     if in_colab:
          if upgrade:
               _UpperCamelCase  :List[Any]       =["""pip""", """install""", """-U""", """torch"""]
               subprocess.run(__a			,      check=__a      )
          # get the current version of torch
          _UpperCamelCase  :str       =importlib.metadata.version("""torch"""      )
          _UpperCamelCase  :List[str]       =torch_version[: torch_version.rindex("""."""      )]
          _UpperCamelCase  :Dict       =F'''https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-{torch_version_trunc}-cp37-cp37m-linux_x86_64.whl'''
          _UpperCamelCase  :Any       =["""pip""", """install""", xla_wheel]
          subprocess.run(__a			,      check=__a      )
     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__   )



