def apply_measurement_error_msg_to_all_mementos(urit, memento_list,
    measuremodel, measurename, errormsg):
    """Iterates through all of the mementos in a `memento_list`
    related to a TimeMap specified by `urit`, associating the same
    error message `errormsg` to each memento in the `measuremodel`.

    This is useful when the first memento in a TimeMap has some flaw
    that will affect processing of other mementos in the TimeMap.
    """
    for memento in memento_list:
        urim = memento['uri']
        measuremodel.set_Memento_measurement_error(urit, urim,
            'timemap measures', measurename, errormsg)
    return measuremodel
