merge sort the merge sort algorithm is based on the divide and conquer rule given list of unsorted elementswe split the list into approximately two halves we continue to divide the two halves recursively after whilethe sublists created as result of the recursive call will contain only one element at that pointwe begin to merge the solutions in the conquer or merge stepdef merge_sort(unsorted_list)if len(unsorted_list= return unsorted_list mid_point int((len(unsorted_list))/ first_half unsorted_list[:mid_pointsecond_half unsorted_list[mid_point:half_a merge_sort(first_halfhalf_b merge_sort(second_halfreturn merge(half_ahalf_bour implementation starts by accepting the list of unsorted elements into the merge_sort function the if statement is used to establish the base casewhere if there is only one element in the unsorted_listwe simply return that list again if there is more than one element in the listwe find the approximate middle using mid_point int((len(unsorted_list))/ using this mid_pointwe divide the list into two sublistsnamely first_half and second_halffirst_half unsorted_list[:mid_pointsecond_half unsorted_list[mid_point: recursive call is made by passing the two sublists to the merge_sort function againhalf_a merge_sort(first_halfhalf_b merge_sort(second_halfenter the merge step when half_a and half_b have been passed their valueswe call the merge function that will merge or combine the two solutions stored in half_a and half_bwhich are listsdef merge(first_sublistsecond_sublist) merged_list [