"""simple docstring"""
def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->list[int]:
  if len(_SCREAMING_SNAKE_CASE  ) > 1:
    a__:	Dict     				=      len(_SCREAMING_SNAKE_CASE  ) // 2  # Finds the middle of the array
    a__:	List[str]     				=      arr[
        :middle_length
    ]  # Creates an array of the elements in the first half.
    a__:	Any     				=      arr[
        middle_length:
    ]  # Creates an array of the elements in the second half.
    a__:	Tuple     				=      len(_SCREAMING_SNAKE_CASE  )
    a__:	Optional[Any]     				=      len(_SCREAMING_SNAKE_CASE  )
    merge(_SCREAMING_SNAKE_CASE  )  # Starts sorting the left.
    merge(_SCREAMING_SNAKE_CASE  )  # Starts sorting the right
    a__:	Any     				=      0  # Left Counter
    a__:	Union[str, Any]     				=      0  # Right Counter
    a__:	int     				=      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]:
        a__:	Union[str, Any]     				=      left_array[left_index]
        left_index += 1
      else:
        a__:	str     				=      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
      a__:	List[Any]     				=      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
      a__:	str     				=      right_array[right_index]
      right_index += 1
      index += 1
  return arr


if __name__ == "__main__":
 import doctest

 doctest.testmod()










"""simple docstring"""





def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE       )       ->						int:
    """simple docstring"""

    if not isinstance(SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       ):
        raise ValueError('double_factorial() only accepts integral values'       )
    if num < 0:
        raise ValueError('double_factorial() not defined for negative values'       )
    UpperCamelCase__								=     1
    for i in range(SCREAMING_SNAKE_CASE			,						0			,						-2       ):
        value *= i
    return value


if __name__ == "__main__":
  import doctest

  doctest.testmod()




