'''simple docstring'''




def 			UpperCamelCase_							(      _UpperCAmelCase						:   list[int]					)					->					list[int]:


       """simple docstring"""







       if len(_UpperCAmelCase					) > 1:
              _UpperCAmelCase  :						List[str]							   =					len(_UpperCAmelCase					) // 2  # Finds the middle of the array
              _UpperCAmelCase  :						Tuple							   =					arr[
                  :middle_length
              ]  # Creates an array of the elements in the first half.
              _UpperCAmelCase  :						List[Any]							   =					arr[
                  middle_length:
              ]  # Creates an array of the elements in the second half.
              _UpperCAmelCase  :						Optional[Any]							   =					len(_UpperCAmelCase					)
              _UpperCAmelCase  :						Dict							   =					len(_UpperCAmelCase					)
              merge(_UpperCAmelCase					)  # Starts sorting the left.
              merge(_UpperCAmelCase					)  # Starts sorting the right
              _UpperCAmelCase  :						Any							   =					0  # Left Counter
              _UpperCAmelCase  :						Any							   =					0  # Right Counter
              _UpperCAmelCase  :						List[Any]							   =					0  # Position Counter
              while (
                  left_index < left_size and right_index < right_size
              ):  # Runs until the lowers size of the left and right are sorted.
                     if left_array[left_index] < right_array[right_index]:
                            _UpperCAmelCase  :						str							   =					left_array[left_index]
                            left_index += 1
                     else:
                            _UpperCAmelCase  :						Union[str, Any]							   =					right_array[right_index]
                            right_index += 1
                     index += 1
              while (
                  left_index < left_size
              ):  # Adds the left over elements in the left half of the array
                     _UpperCAmelCase  :						int							   =					left_array[left_index]
                     left_index += 1
                     index += 1
              while (
                  right_index < right_size
              ):  # Adds the left over elements in the right half of the array
                     _UpperCAmelCase  :						Tuple							   =					right_array[right_index]
                     right_index += 1
                     index += 1
       return arr


if __name__ == "__main__":
  import doctest

  doctest.testmod()


'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


__SCREAMING_SNAKE_CASE :  Union[str, Any]  =						{
    """configuration_gptsan_japanese""": ["""GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTSanJapaneseConfig"""],
    """tokenization_gptsan_japanese""": ["""GPTSanJapaneseTokenizer"""],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __SCREAMING_SNAKE_CASE :  Optional[int]  =						[
      """GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """GPTSanJapaneseForConditionalGeneration""",
      """GPTSanJapaneseModel""",
      """GPTSanJapanesePreTrainedModel""",
  ]
  __SCREAMING_SNAKE_CASE :  Union[str, Any]  =						[
      """GPTSanJapaneseTokenizer""",
  ]


if TYPE_CHECKING:
  from .configuration_gptsan_japanese import GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTSanJapaneseConfig
  from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_gptsan_japanese import (
        GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
        GPTSanJapaneseForConditionalGeneration,
        GPTSanJapaneseModel,
        GPTSanJapanesePreTrainedModel,
    )
    from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer


else:
  import sys

  __SCREAMING_SNAKE_CASE :  Union[str, Any]  =						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

