
from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
      from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline


def        __UpperCamelCase					(    lowerCAmelCase__							:    list  ):

 def merge(lowerCAmelCase__							:    list  ,       lowerCAmelCase__							:    list  ) -> list:

  def _merge():
   while left and right:
    yield (left if left[0] <= right[0] else right).pop(0  )
   yield from left
   yield from right

  return list(_merge()  )

 if len(lowerCAmelCase__  ) <= 1:
  return collection
 __a			:  str		    =  len(lowerCAmelCase__  ) // 2
 return merge(merge_sort(collection[:mid]  )  ,       merge_sort(collection[mid:]  )  )


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      lowercase__          =input('Enter numbers separated by a comma:\n').strip()
      lowercase__          =[int(item) for item in user_input.split(',')]
      print(*merge_sort(unsorted), sep=',')
