def mut4(genotype, start_index, end_index):
    """reverses chromosome fragment in time
    
    Args:
        genotype ((int, int)[]): list of tuples (pitch, dur) representing genotype of a chromosome
        start_index (int): index where fragment begins
        end_index (int): index where fragment ends
    
    Returns:
        (int, int)[]: returns new genotype with mutated fragment
    """
    fragment = genotype[start_index:end_index+1]
    fragment.reverse()

    for i, (ed, dur) in enumerate(genotype):
        if i >= start_index and i <= end_index:
            genotype[i] = fragment[i-start_index]

    return genotype