Implementation of merge sort algorithm in python