





"""simple docstring"""






import os
import sys
import unittest


A			      =	os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, '''utils'''))

import check_dummies  # noqa: E402
from check_dummies import create_dummy_files, create_dummy_object, find_backend, read_init  # noqa: E402


# Align TRANSFORMERS_PATH in check_dummies with the current path
A			      =	os.path.join(git_repo_path, '''src''', '''transformers''')

A			      =	'''
{0} = None
'''

A			      =	'''
class {0}(metaclass=DummyObject):
    _backends = {1}

    def __init__(self, *args, **kwargs):
        requires_backends(self, {1})
'''


A			      =	'''
def {0}(*args, **kwargs):
    requires_backends({0}, {1})
'''




class 					__lowercase      (      unittest.TestCase				):







					'''simple docstring'''




					def 			_lowerCamelCase		(    self  ):
									__a			:    Optional[Any]      							=	find_backend('''    _import_structure["models.albert"].append("AlbertTokenizerFast")'''  )
									self.assertIsNone(_UpperCAmelCase  )

									__a			:    Optional[int]      							=	find_backend('''    if not is_tokenizers_available():'''  )
									self.assertEqual(_UpperCAmelCase						,      '''tokenizers'''  )

									__a			:    List[Any]      							=	find_backend('''    if not is_tensorflow_text_available():'''  )
									self.assertEqual(_UpperCAmelCase						,      '''tensorflow_text'''  )

									__a			:    Tuple      							=	find_backend('''    if not (is_sentencepiece_available() and is_tokenizers_available()):'''  )
									self.assertEqual(_UpperCAmelCase						,      '''sentencepiece_and_tokenizers'''  )

									__a			:    str      							=	find_backend(
									    '''    if not (is_sentencepiece_available() and is_tensorflow_text_available()):'''  )
									self.assertEqual(_UpperCAmelCase						,      '''sentencepiece_and_tensorflow_text'''  )

									__a			:    Union[str, Any]      							=	find_backend(
									    '''    if not (is_sentencepiece_available() and is_tokenizers_available() and is_vision_available()):'''  )
									self.assertEqual(_UpperCAmelCase						,      '''sentencepiece_and_tokenizers_and_vision'''  )







					def 			_lowerCamelCase		(    self  ):
									__a			:    str      							=	read_init()
									# We don't assert on the exact list of keys to allow for smooth grow of backend-specific objects
									self.assertIn('''torch'''						,      _UpperCAmelCase  )
									self.assertIn('''tensorflow_text'''						,      _UpperCAmelCase  )
									self.assertIn('''sentencepiece_and_tokenizers'''						,      _UpperCAmelCase  )

									# Likewise, we can't assert on the exact content of a key
									self.assertIn('''BertModel'''						,      objects['''torch''']  )
									self.assertIn('''TFBertModel'''						,      objects['''tf''']  )
									self.assertIn('''FlaxBertModel'''						,      objects['''flax''']  )
									self.assertIn('''BertModel'''						,      objects['''torch''']  )
									self.assertIn('''TFBertTokenizer'''						,      objects['''tensorflow_text''']  )
									self.assertIn('''convert_slow_tokenizer'''						,      objects['''sentencepiece_and_tokenizers''']  )







					def 			_lowerCamelCase		(    self  ):
									__a			:    str      							=	create_dummy_object('''CONSTANT'''						,      '''\'torch\''''  )
									self.assertEqual(_UpperCAmelCase						,      '''\nCONSTANT = None\n'''  )

									__a			:    str      							=	create_dummy_object('''function'''						,      '''\'torch\''''  )
									self.assertEqual(
									    _UpperCAmelCase						,      '''\ndef function(*args, **kwargs):\n    requires_backends(function, \'torch\')\n'''  )

									__a			:    int      							=	'''
class FakeClass(metaclass=DummyObject):
    _backends = \'torch\'

    def __init__(self, *args, **kwargs):
        requires_backends(self, \'torch\')
'''
									__a			:    List[str]      							=	create_dummy_object('''FakeClass'''						,      '''\'torch\''''  )
									self.assertEqual(_UpperCAmelCase						,      _UpperCAmelCase  )







					def 			_lowerCamelCase		(    self  ):
									__a			:    List[str]      							=	'''# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends


CONSTANT = None


def function(*args, **kwargs):
    requires_backends(function, ["torch"])


class FakeClass(metaclass=DummyObject):
    _backends = ["torch"]

    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])
'''
									__a			:    Any      							=	create_dummy_files({'''torch''': ['''CONSTANT''', '''function''', '''FakeClass''']}  )
									self.assertEqual(dummy_files['''torch''']						,      _UpperCAmelCase  )





UpperCAmelCase_		:					Tuple          =  0  # The first color of the flag.
UpperCAmelCase_		:					Any          =  1  # The second color of the flag.
UpperCAmelCase_		:					str          =  2  # The third color of the flag.
UpperCAmelCase_		:					Tuple          =  (red, white, blue)




def 		lowerCAmelCase_ (						lowerCamelCase ):
				if not sequence:
								return []
				if len(lowerCamelCase ) == 1:
								return list(lowerCamelCase )
				__magic_name__						:						int										=0
				__magic_name__						:						str										=len(lowerCamelCase ) - 1
				__magic_name__						:						Optional[Any]										=0
				while mid <= high:
								if sequence[mid] == colors[0]:
												__magic_name__					,			__magic_name__						:						Tuple										=sequence[mid], sequence[low]
												low += 1
												mid += 1
								elif sequence[mid] == colors[1]:
												mid += 1
								elif sequence[mid] == colors[2]:
												__magic_name__					,			__magic_name__						:						Optional[Any]										=sequence[high], sequence[mid]
												high -= 1
								else:
												__magic_name__						:						Optional[int]										=F"The elements inside the sequence must contains only {colors} values"
												raise ValueError(lowerCamelCase )
				return sequence


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							UpperCAmelCase_		:					List[Any]          =  input("Enter numbers separated by commas:\n").strip()
							UpperCAmelCase_		:					Optional[int]          =  [int(item.strip()) for item in user_input.split(",")]
							print(F"""{dutch_national_flag_sort(unsorted)}""")




