"""simple docstring"""




_a      :		Dict           =   0  # The first color of the flag.
_a      :		Union[str, Any]           =   1  # The second color of the flag.
_a      :		Dict           =   2  # The third color of the flag.
_a      :		Union[str, Any]           =   (red, white, blue)





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       list	)       ->      list:
  if not sequence:
    return []
  if len(_lowerCamelCase	) == 1:
    return list(_lowerCamelCase	)
  _lowerCAmelCase						:       List[Any]  			=     0
  _lowerCAmelCase						:       Union[str, Any]  			=     len(_lowerCamelCase	) - 1
  _lowerCAmelCase						:       Tuple  			=     0
  while mid <= high:
    if sequence[mid] == colors[0]:
      _lowerCAmelCase			,	_lowerCAmelCase						:       Any  			=     sequence[mid], sequence[low]
      low += 1
      mid += 1
    elif sequence[mid] == colors[1]:
      mid += 1
    elif sequence[mid] == colors[2]:
      _lowerCAmelCase			,	_lowerCAmelCase						:       Any  			=     sequence[high], sequence[mid]
      high -= 1
    else:
      _lowerCAmelCase						:       Dict  			=     f"The elements inside the sequence must contains only {colors} values"
      raise ValueError(_lowerCamelCase	)
  return sequence


if __name__ == "__main__":
     import doctest

     doctest.testmod()

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











'''simple docstring'''
import pytest

from datasets.splits import SplitDict, SplitInfo
from datasets.utils.py_utils import asdict
@pytest.mark.parametrize(
    'split_dict'				,  [
        SplitDict(),
        SplitDict({'train': SplitInfo(name='train'				,  num_bytes=1337				,  num_examples=42				,  dataset_name='my_dataset'     )}     ),
        SplitDict({'train': SplitInfo(name='train'				,  num_bytes=1337				,  num_examples=42     )}     ),
        SplitDict({'train': SplitInfo()}     ),
    ]				,  )
def 				lowercase__   (   __lowercase						:  SplitDict     ) ->      int:



       """simple docstring"""






       __UpperCamelCase       =  split_dict._to_yaml_list()
       assert len(__lowercase     ) == len(__lowercase     )
       __UpperCamelCase       =  SplitDict._from_yaml_list(__lowercase     )
       for split_name, split_info in split_dict.items():
              # dataset_name field is deprecated, and is therefore not part of the YAML dump
              __UpperCamelCase       =  None
              # the split name of split_dict takes over the name of the split info object
              __UpperCamelCase       =  split_name
       assert split_dict == reloaded


@pytest.mark.parametrize(
    'split_info'				,  [SplitInfo(), SplitInfo(dataset_name=__lowercase     ), SplitInfo(dataset_name='my_dataset'     )]     )
def 				lowercase__   (   __lowercase						:  Dict     ) ->      Any:



       """simple docstring"""






       __UpperCamelCase       =  asdict(SplitDict({'train': split_info}     )     )
       assert "dataset_name" in split_dict_asdict["train"]
       assert split_dict_asdict["train"]["dataset_name"] == split_info.dataset_name
