<prompt> Tekeleza algorithm ya kupanga katika Python ambayo hupanga orodha ya nambari kamili kwa mpangilio wa kupanda na kuchapisha idadi ya ulinganisho uliofanywa wakati wa mchakato wa kupanga.  <response>: def merge_sortarr: ikiwa lenarr 1: kurudi nyuma, 0 katikati lenarr 2 kushoto, count_left merge_sortarr:mid kulia, count_right merge_sortarrkatikati: meged_arr, count_merge unganisha kushoto, kulia total_count count_left count_right count_merge rudisha iliyounganishwa_hesabu, jumla_hesabudef unganisha kushoto, kulia: matokeo i j kulinganisha 0 wakati mimi lenkushoto na j lenkulia: kulinganisha 1 ikiwa kushotoi 