def sort_python_measurement_files(folder):
    """Sort a folder of measurement data by order of measurements.

    This doesn't strictly preserve measurement order but rather groups files by
    measurement type in the experiment order.

    Parameters
    ----------
    folder : pathlib.Path
        Folder of data to sort.

    Returns
    -------
    sorted_files : list
        Sorted folder of data.
    """
    # get the set of unique relative file names excluding extensions
    unique_device_file_names = {f.parts[-1].split(".")[0] for f in folder.iterdir()}

    # loop over this set of unique devices and sort by measurement order
    search_exts = [".vt.tsv", ".div*.tsv", ".liv*.tsv", ".mppt.tsv", ".it.tsv"]
    sorted_list = []
    for device_file_name in unique_device_file_names:
        for ext in search_exts:
            sorted_list.extend(sorted(list(folder.glob(f"{device_file_name}{ext}"))))

    return sorted_list