def merge_init(keys):
        """
        Initialize a MergeState for a non-keyed sort.
        """
        temp_size = min(len(keys) // 2 + 1, MERGESTATE_TEMP_SIZE)
        temp_keys = make_temp_area(keys, temp_size)
        temp_values = temp_keys
        pending = [MergeRun(zero, zero)] * MAX_MERGE_PENDING
        return MergeState(intp(MIN_GALLOP), temp_keys, temp_values, pending, zero)

        Initialize a MergeState for a non-keyed sort.
        
numba/misc/timsort.py