




"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


lowerCAmelCase							:    int  							=     {"processing_layoutxlm": ["LayoutXLMProcessor"]}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase							:    Optional[int]  							=     ["LayoutXLMTokenizer"]

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase							:    int  							=     ["LayoutXLMTokenizerFast"]

if TYPE_CHECKING:
					from .processing_layoutxlm import LayoutXLMProcessor

					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_layoutxlm import LayoutXLMTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
					import sys

					lowerCAmelCase							:    int  							=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)









"""simple docstring"""




from __future__ import annotations



def 					a__				(       snake_case__ ,				snake_case__ = None ,				snake_case__ = None       )		->      None:
			if start is None:
						lowerCamelCase       =      0

			if end is None:
						lowerCamelCase       =      len(snake_case__       ) - 1

			if start >= end:
						return

			lowerCamelCase       =      (start + end) // 2

			slowsort(snake_case__ ,				snake_case__ ,				snake_case__       )
			slowsort(snake_case__ ,				mid + 1 ,				snake_case__       )

			if sequence[end] < sequence[mid]:
						lowerCamelCase   ,     lowerCamelCase       =      sequence[mid], sequence[end]

			slowsort(snake_case__ ,				snake_case__ ,				end - 1       )


if __name__ == "__main__":
					from doctest import testmod

					testmod()



