code: 
  
  
  from __future__ import annotations
  
  
  
  
  def 			__lowercase	(						_UpperCamelCase,    _UpperCamelCase     )    ->list:
  
  
  
  
  
  
  
        """simple docstring"""
  
        lowercase			:   Optional[int]					   =		[None] * (len(_UpperCamelCase     ) + len(_UpperCamelCase     ))
  
        lowercase			:   List[str]					   =		0  # pointer to current index for left Half
        lowercase			:   Dict					   =		0  # pointer to current index for the right Half
        lowercase			:   Optional[int]					   =		0  # pointer to current index for the sorted array Half
  
        while pointera < len(_UpperCamelCase     ) and pointera < len(_UpperCamelCase     ):
              if left_half[pointera] < right_half[pointera]:
                    lowercase			:   List[Any]					   =		left_half[pointera]
                    pointera += 1
                    index += 1
              else:
                    lowercase			:   Dict					   =		right_half[pointera]
                    pointera += 1
                    index += 1
        while pointera < len(_UpperCamelCase     ):
              lowercase			:   Optional[Any]					   =		left_half[pointera]
              pointera += 1
              index += 1
  
        while pointera < len(_UpperCamelCase     ):
              lowercase			:   Optional[int]					   =		right_half[pointera]
              pointera += 1
              index += 1
  
        return sorted_array
  
  
  
  
  def 			__lowercase	(						_UpperCamelCase     )    ->list:
  
  
  
  
  
  
  
        """simple docstring"""
  
        if len(_UpperCamelCase     ) <= 1:
              return array
        # the actual formula to calculate the middle element = left + (right - left) // 2
        # this avoids integer overflow in case of large N
        lowercase			:   Tuple					   =		0 + (len(_UpperCamelCase     ) - 0) // 2
  
        # Split the array into halves till the array length becomes equal to One
        # merge the arrays of single length returned by mergeSort function and
        # pass them into the merge arrays function which merges the array
        lowercase			:   Tuple					   =		array[:middle]
        lowercase			:   List[str]					   =		array[middle:]
  
        return merge(merge_sort(_UpperCamelCase     ),    merge_sort(_UpperCamelCase     )     )
  
  
  if __name__ == "__main__":
    import doctest
  
    doctest.testmod()
  
  
style_context: 
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available
  
  
  __a   				=      {'''configuration_yoso''': ['''YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''YosoConfig''']}
  
  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    __a   				=      [
        '''YOSO_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''YosoForMaskedLM''',
        '''YosoForMultipleChoice''',
        '''YosoForQuestionAnswering''',
        '''YosoForSequenceClassification''',
        '''YosoForTokenClassification''',
        '''YosoLayer''',
        '''YosoModel''',
        '''YosoPreTrainedModel''',
    ]
  
  
  if TYPE_CHECKING:
    from .configuration_yoso import YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP, YosoConfig
  
    try:
      if not is_torch_available():
        raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
      pass
    else:
      from .modeling_yoso import (
          YOSO_PRETRAINED_MODEL_ARCHIVE_LIST,
          YosoForMaskedLM,
          YosoForMultipleChoice,
          YosoForQuestionAnswering,
          YosoForSequenceClassification,
          YosoForTokenClassification,
          YosoLayer,
          YosoModel,
          YosoPreTrainedModel,
      )
  
  
  else:
    import sys
  
    __a   				=      _LazyModule(__name__, globals()['''__file__'''], _import_structure)
  
  